Last active
January 21, 2026 16:27
-
-
Save abohmeed/48328a413cc76eea2a98cca4e25259ab to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| # /etc/init.d/myservice | |
| case "$1" in | |
| start) | |
| echo "Starting myservice" | |
| /usr/bin/myservice & | |
| ;; | |
| stop) | |
| echo "Stopping myservice" | |
| killall myservice | |
| ;; | |
| restart) | |
| $0 stop | |
| $0 start | |
| ;; | |
| *) | |
| echo "Usage: $0 {start|stop|restart}" | |
| exit 1 | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment