Skip to content

Instantly share code, notes, and snippets.

@Faqahat
Created April 22, 2019 14:38
Show Gist options
  • Save Faqahat/3412576eb4465d9a71c76182c3d9cae8 to your computer and use it in GitHub Desktop.
Save Faqahat/3412576eb4465d9a71c76182c3d9cae8 to your computer and use it in GitHub Desktop.
Samp Server Linux Service
#!/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
@Faqahat
Copy link
Author

Faqahat commented Apr 22, 2019

Setup:
vim /usr/local/bin/samp
Paste the Code , Change "/server" with your server directory.
chmod +x /usr/local/bin/samp

Commands:

  • samp start
  • samp restart
  • samp restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment