SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 02/07/2012, 11:23 AM   #1
R@f
Huge Clucker
 
Join Date: Aug 2007
Location: Switzerland
Posts: 358
Reputation: 217
Default [Bash]Start/Stop script

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

Last edited by R@f; 10/10/2013 at 03:00 PM.
R@f is online now   Reply With Quote
Old 02/07/2012, 11:26 AM   #2
next-studio|TheKiller
Guest
 
Posts: n/a
Default Re: [Bash]Start/Stop script

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.
  Reply With Quote
Old 02/07/2012, 01:09 PM   #3
R@f
Huge Clucker
 
Join Date: Aug 2007
Location: Switzerland
Posts: 358
Reputation: 217
Default Re: [Bash]Start/Stop script

Quote:
Originally Posted by next-studio|TheKiller View Post
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.
R@f is online now   Reply With Quote
Old 02/07/2012, 02:33 PM   #4
int3s0
Huge Clucker
 
int3s0's Avatar
 
Join Date: Feb 2011
Location: Europe, Croatia
Posts: 365
Reputation: 75
Default Re: [Bash]Start/Stop script

Simple, but useful
int3s0 is offline   Reply With Quote
Old 02/07/2012, 02:43 PM   #5
Lordzy
High-roller
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,370
Reputation: 759
Default Re: [Bash]Start/Stop script

This is good.
__________________

Looking for affordable VPS with DDOS protection? Check out blackbirdhost.com
Interested on building something with me? Click here.
Lordzy is offline   Reply With Quote
Old 02/10/2012, 11:38 AM   #6
[UE]Milan
High-roller
 
Join Date: Jan 2012
Location: Right in front of forum.sa-mp.com
Posts: 1,127
Reputation: 131
Default Re: [Bash]Start/Stop script

With this a CP for a samp server kinda seems useless
__________________
.
[UE]Milan is offline   Reply With Quote
Old 28/11/2012, 03:05 AM   #7
Kontrol
Big Clucker
 
Join Date: Jan 2012
Location: British Solider
Posts: 197
Reputation: 23
Default Re: [Bash]Start/Stop script

Wow cheers dude needed this!
__________________

Follow us on Facebook. Get involved.
_________________________________________________
Maximum Stunting:
95.211.180.224:7833
Kontrol is offline   Reply With Quote
Old 03/10/2013, 08:47 PM   #8
TheRunixx
Little Clucker
 
Join Date: Jul 2013
Posts: 14
Reputation: 0
Default Re: [Bash]Start/Stop script

Link don't work!!
TheRunixx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] Bash script to install SA-MP server linuxthefish Tools and Files 16 14/05/2012 07:22 PM
[Bash script]Install a new SA-MP server easily R@f Server Support 5 20/10/2011 08:24 PM
PHP Start/Stop Script xinul Server Support 1 03/06/2009 08:56 PM
[Tool/Web/Other] [PHP] How to start / stop Linux Server d123 Server Support 6 11/05/2009 08:00 AM


All times are GMT. The time now is 09:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.