diff --git a/debian/sylkserver.default b/debian/sylkserver.default deleted file mode 100644 index d96d103..0000000 --- a/debian/sylkserver.default +++ /dev/null @@ -1,13 +0,0 @@ -# -# SylkServer startup options -# - -# NOTE: This file is not used when systemd is in use - -# Set to yes to enable SylkServer, once configured properly -# by editing /etc/sylkserver/config.ini -RUN_SYLKSERVER=no - -# Set to yes to enable creating code dump files in case of a crash -DUMP_CORE=no - diff --git a/debian/sylkserver.init b/debian/sylkserver.init index dd847d4..96faf93 100644 --- a/debian/sylkserver.init +++ b/debian/sylkserver.init @@ -1,75 +1,62 @@ #!/bin/sh # ### BEGIN INIT INFO # Provides: sylkserver # Required-Start: $syslog $network $local_fs $remote_fs $time # Required-Stop: $syslog $network $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the SylkServer # Description: Start the SylkServer ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin INSTALL_DIR="/usr/bin" RUNTIME_DIR="/var/run/sylkserver" -DEFAULTS="/etc/default/sylkserver" SERVER="$INSTALL_DIR/sylk-server" PID="$RUNTIME_DIR/sylk-server.pid" OPTIONS="" NAME="sylk-server" DESC="SylkServer" test -f $SERVER || exit 0 . /lib/lsb/init-functions -# Load startup options if available -if [ -f $DEFAULTS ]; then - . $DEFAULTS || true -fi - -if [ "$RUN_SYLKSERVER" != "yes" ]; then - echo "SylkServer not yet configured. Edit /etc/default/sylkserver first." - exit 0 -fi - -if [ "$DUMP_CORE" = "yes" ]; then - ulimit -c unlimited -fi +ulimit -c unlimited start() { log_daemon_msg "Starting $DESC: $NAME " start-stop-daemon --start --quiet --pidfile $PID \ --exec $SERVER -- $OPTIONS || log_progress_msg "already running" } stop () { log_daemon_msg "Stopping $DESC: $NAME " start-stop-daemon --stop --quiet --oknodo --retry=TERM/15/KILL/5 --pidfile $PID } case "$1" in start) start log_end_msg 0 ;; stop) stop log_end_msg 0 ;; restart|force-reload) stop start log_end_msg 0 ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0