Como root:
- Salve o texto a seguir como
/etc/init.d/conan
. - Defina o sinalizador de executável
chmod +x /etc/init.d/conan
. - Tente executá-lo:
/etc/init.d/conan start
- tudo bem? adicione-o aos runlevels
update-rc.d conan defaults
#! /bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="conan service" NAME=conan DAEMON=/usr/sbin/$NAME DAEMON_ARGS="--options args" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME . /lib/init/vars.sh . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" export DISPLAY=:0 export WINEARCH=win64 export WINEPREFIX=/home/steam/.wine64 xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 & ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" wineserver -k #wineserver -k9 ;; status) [ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running" ;; restart) stop sleep 2 start ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2 exit 3 ;; esac