Try another method for crash mailing
This commit is contained in:
parent
39efde5369
commit
67ff97b27d
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $SERVICE_RESULT == "success" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
/home/hmn/hmn/adminmailer/adminmailer "[$1] Status changed" <<ERRMAIL
|
/home/hmn/hmn/adminmailer/adminmailer "[$1] Status changed" <<ERRMAIL
|
||||||
$(service "$1" status)
|
$(service "$1" status)
|
||||||
ERRMAIL
|
ERRMAIL
|
||||||
|
|
|
@ -28,7 +28,7 @@ LimitNPROC=512
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
OnFailure=status-email@%n.service
|
ExecStopPost=status-email@%n.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -10,7 +10,7 @@ ExecStart=/home/hmn/hmn/cinera/start.sh
|
||||||
ExecStop=/home/hmn/hmn/cinera/stop.sh
|
ExecStop=/home/hmn/hmn/cinera/stop.sh
|
||||||
PIDFile=/home/hmn/hmn/cinera/data/cinera.pid
|
PIDFile=/home/hmn/hmn/cinera/data/cinera.pid
|
||||||
Restart=always
|
Restart=always
|
||||||
OnFailure=status-email@%n.service
|
ExecStopPost=status-email@%n.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -8,7 +8,7 @@ Group=hmn
|
||||||
ExecStart=/home/hmn/bin/hmn
|
ExecStart=/home/hmn/bin/hmn
|
||||||
Restart=always
|
Restart=always
|
||||||
TimeoutStopSec=15
|
TimeoutStopSec=15
|
||||||
OnFailure=status-email@%n.service
|
ExecStopPost=status-email@%n.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Reference in New Issue