QUELLE
Server abschalten und abgeschaltet lassen!
tar cfvz /mnt/_MOVETEMP/20191004-dvets.tar.gz * .
ZIEL
useradd ts -d /home/ts/
mkdir -p /home/ts
cd /home/ts
tar xfvz /mnt/_MOVETEMP/20191004-dvets.tar.gz
chown ts:ts /home/ts -R
mc -e /etc/init.d/ts
#!/bin/sh
### BEGIN INIT INFO
# Provides: ts
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Teamspeak 3 Server
# chkconfig: 2345 99 01
# description: Teamspeak 3 Server
### END INIT INFO
HOME="/home/ts/ts"
VALUE="$1"
USER="ts"
case "$1" in
start)
su $USER -c "${HOME}/ts3server_startscript.sh start"
;;
stop)
su $USER -c "${HOME}/ts3server_startscript.sh stop"
;;
restart)
su $USER -c "${HOME}/ts3server_startscript.sh restart"
;;
status)
su $USER -c "${HOME}/ts3server_startscript.sh status"
;;
*)
echo "Usage: `basename $0` {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
# Code Ende
chmod +x /etc/init.d/ts
apt-get install rcconf
rcconf -> ts einschalten
service ts start
service ts status
service ts stop