Last active
August 29, 2015 14:20
-
-
Save dropofwill/21af80591041e28b02f8 to your computer and use it in GitHub Desktop.
A sample Upstart and System.d script
This file contains 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=Custom Start Up Service | |
[Service] | |
ExecStartPre=/bin/mkdir -p /var/log/customprocess | |
ExecStartPre=/bin/touch /var/log/customprocess/custom.log | |
ExecStart=/var/custom_service/our_service.sh | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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
description "Custom Start up" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
pre-start script | |
mkdir -p /var/log/customprocess | |
touch /var/log/customprocess/cusom.log | |
end script | |
script | |
echo `date` >> /var/log/customprocess/custom.log | |
end script |
This file contains 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=Custom Start Up Service | |
[Service] | |
ExecStartPre=/bin/mkdir -p /var/log/customprocess | |
ExecStartPre=/bin/touch /var/log/customprocess/custom.log | |
ExecStart=/var/custom_service/our_service.sh | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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
#!/bin/bash | |
date >> /var/log/customprocess/custom.log; | |
sleep 3h; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment