#!/bin/sh ### BEGIN INIT INFO # Provides: plinth # Required-Start: $network $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: plinth web frontend # Description: # Control the plinth web frontend. ### END INIT INFO # This file is /etc/init.d/plinth DESC="embedded web frontend" NAME=plinth DAEMON=/usr/bin/plinth PID_FILE=/var/run/plinth.pid SERVER_DIR=/plinth PLINTH_USER=plinth PLINTH_GROUP=plinth test -x $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" start_daemon -p $PID_FILE $DAEMON --pidfile=$PID_FILE \ --server_dir=$SERVER_DIR log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" killproc -p $PID_FILE $DAEMON RETVAL=$? [ $RETVAL -eq 0 ] && [ -e "$PID_FILE" ] && rm -f $PID_FILE log_end_msg $RETVAL ;; restart|force-reload) $0 stop $0 start ;; status) status_of_proc -p $PID_FILE "$DAEMON" plinth && exit 0 || exit $? ;; *) echo "Usage: $NAME {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac