Created
December 25, 2019 08:07
-
-
Save zhouqiang-cl/5dabe82bab618ae1e8fffd9b7b2b62a9 to your computer and use it in GitHub Desktop.
failure-gen.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=failure gen service | |
After=syslog.target network.target | |
[Service] | |
SyslogIdentifier=failure-gen | |
ExecStart=/opt/onfailure-test/failure-gen /opt/onfailure-test/aaa | |
ExecStopPost=/bin/bash -c '/bin/systemctl status failure-gen | /usr/bin/mailx -Ssendwait -s "[failure-gen] failure notification" [email protected]' | |
Restart=always | |
RestartSec=15s | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment