[Tool/Web/Other] [Bash]Start/Stop script
#1

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
Reply
#2

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
#3

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.
Reply
#4

Simple, but useful
Reply
#5

This is good.
Reply
#6

With this a CP for a samp server kinda seems useless
Reply
#7

Wow cheers dude needed this!
Reply
#8

Link don't work!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)