Portál AbcLinuxu, 17. července 2025 12:57
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/ts3/ts3.sh
exit 0
runlevel ls /etc/rcRUNLEVEL.d/Tam by melo byt mimo line SXXrc.local, coz je symlink na /etc/init.d/rc.local, pokud to tam neni, tak si ten symlink dodelej.
ln -s /etc/init.d/rc.local /etc/rcRUNLEVEL.d/S06rc.local
#!/bin/sh ### BEGIN INIT INFO # Provides: ts3server # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: ts3server # Description: TeamSpeak 3 server. ### END INIT INFO DIR="/home/ts3server/teamspeak3_server/" USER=ts3server OPTS="inifile=ts3server.ini" . /lib/lsb/init-functions cd ${DIR} case "$1" in start) #There has to be some delay, to let init openvpn's interfaces sleep 10 su -m ${USER} -c "./ts3server_startscript.sh start ${OPTS}" ;; stop) su -m ${USER} -c "./ts3server_startscript.sh stop" ;; *) echo "Usage: /etc/init.d/ts3server {start|stop}" exit 1 ;; esac exit 0
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.