Created
April 22, 2019 14:38
-
-
Save Faqahat/3412576eb4465d9a71c76182c3d9cae8 to your computer and use it in GitHub Desktop.
Samp Server Linux 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
#!/bin/bash | |
set -e | |
cd /samp-svr | |
case "$1" in | |
'start') | |
exec nohup ./samp-svr | |
;; | |
'stop') | |
exec killall samp-svr | |
;; | |
'restart') | |
killall samp-svr | |
sleep 1 | |
exec nohup ./samp-svr | |
;; | |
*) | |
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
Setup:
vim /usr/local/bin/samp
Paste the Code , Change "/server" with your server directory.
chmod +x /usr/local/bin/samp
Commands: