Don't use init.d file, don't daemonize

We pretty much only run in systemd environment and I don't see that
changing any time soon.  By relying on it, we can reduce some burden.
Remove init script.

Daemonizing is not needed for systemd.  Remove code related
daemonization.
This commit is contained in:
Sunil Mohan Adapa committed 2016-05-29 20:32:12 +05:30
1 parent f6884a18fa
commit 1f53321b51
6 files changed
+3 -86

No files matched your search

-71
View File
@@ -1,71 +0,0 @@
#!/bin/sh
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
### 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
+1 -1
View File
@@ -21,7 +21,7 @@ Documentation=man:plinth(1)
After=network.target
[Service]
ExecStart=/usr/bin/plinth --no-daemon
ExecStart=/usr/bin/plinth
Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID