[Tool/Web/Other] [Bash]Start/Stop script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (
https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] [Bash]Start/Stop script (
/showthread.php?tid=356086)
[Bash]Start/Stop script -
R@f - 02.07.2012
Hello,
Here's a small script I just wrote, a Start/Stop script for GNU/Linux.
Usage
./samp.sh start
./samp.sh stop
./samp.sh restart
./samp.sh status
Download
https://github.com/RafaelKeramidas/S...master/samp.sh
How to "install" it
1. Connect to your Linux server.
2. Create a new file (samp.sh)
3. Paste the script in the file you just created.
4. Change the config (see below).
5. Save the file.
6. Make it executable (chmod +x samp.sh).
7. Use it !
Config
DIR = The directory where your SA-MP Server is located.
EXEC = The name of your SA-MP Server executable.
SCREENNAME = The name for the SA-MP Screen.
DESC = Description or name of your SA-MP Server.
My other Bash scripts
I created a collection of Bash scripts for SA-MP on GitHub, take a look at them (more coming) :
https://github.com/RafaelKeramidas/SAMPScripts/
Enjoy
Re: [Bash]Start/Stop script - next-studio|TheKiller - 02.07.2012
Sorry, but it's totally better using the linux screen / nohup / run on background commands than bash, since you spend the same time doing the commands.
It can be usefull for some people, but not for other people.
Re: [Bash]Start/Stop script -
R@f - 02.07.2012
Quote:
Originally Posted by next-studio|TheKiller
Sorry, but it's totally better using the linux screen / nohup / run on background commands than bash, since you spend the same time doing the commands.
It can be usefull for some people, but not for other people.
|
I don't really understand why it's totally better to type the whole screen command instead of a small script name. You can even put it in the /usr/bin to use it like a Linux command (if you do it, remove the file extension).
But yeah, maybe the script isn't useful for people who know how to manage a Linux server but if you setup a SSH access for a SA-MP Server for someone who is not really familiar with command line interface, it's much easier to tell him how to use this script instead of three different commands (screen, kill, ps) with lot of parameters.
Re: [Bash]Start/Stop script -
int3s0 - 02.07.2012
Simple, but useful
Re: [Bash]Start/Stop script -
Lordzy - 02.07.2012
This is good.
Re: [Bash]Start/Stop script -
[UE]Milan - 02.10.2012
With this a CP for a samp server kinda seems useless
Re: [Bash]Start/Stop script -
Kontrol - 28.11.2012
Wow cheers dude needed this!
Re: [Bash]Start/Stop script -
TheRunixx - 03.10.2013
Link don't work!!