Simpel autostart Script for Linux/Debian/Ubuntu

Exampel Script:

#!/bin/sh
### BEGIN INIT INFO
case "$1" in
start)
echo "Starting NAME"
start-stop-daemon --start -quiet -u counterstrike --chuid counterstrike --exec /home/counterstrike/source/server1/csStart.sh start ca
;;
stop)
echo "Stopping NAME"
start-stop-daemon --start -quiet -u counterstrike --chuid counterstrike --exec /home/counterstrike/source/server1/csStart.sh stop
;;
*)
echo "Usage: /etc/init.d/css1 {start|stop}"
exit 1
;;
esac
exit 0

 

Template and Instruction:

#!/bin/sh
### BEGIN INIT INFO
### 1. Replace NAME with the name of your service
### 2. Replace USER with the user you will run the service
### 3. Replace PATH with path to your programm
### 4. Replace COMMAND with command for your programm
### 5. Save the file with service NAME in the /etc/init.d/
### 7. got to /etc/init.d/
### 6. run "sudo update-rc.d NAME defaults"

case "$1" in
start)
echo "Starting NAME"
start-stop-daemon --start -quiet -u USER --chuid USER --exec PATH COMMAND
;;
stop)
echo "Stopping NAME"
start-stop-daemon --start -quiet -u USER --chuid USER --exec PATH COMMAND
;;
*)
echo "Usage: service NAME {start|stop}"
exit 1
;;
esac
exit 0

Proper nutrition is an great part of leading a good lifestyle. But can drugs help us? Many families know that drugs are made to help us, but they can hurt us if taken incorrectly. There are medications intended only for women. Below are some basic reasons about „Over the Counter Anxiety Medicine„. Is it possible to prevent side effects of Viagra? What heartiness care providers talk about „Best over the counter weight loss pills„? Matters, like „Over the Counter Diet Pills„, are connected a lot of types of heartiness problems. Usually, having nuisance getting an erection can be embarrassing. This medicine is for you only. Never give your medicaments to other people even if their symptoms to be the same as yours.

Schreibe einen Kommentar