/etc/init.d/freevo_webserver is in freevo 1.9.2b2-4.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #! /bin/sh
### BEGIN INIT INFO
# Provides: freevo-webserver
# Required-Start: $remote_fs $time
# Required-Stop: $remote_fs $time
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the Freevo Home Theatre PC Platform webserver
# Description:
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/freevo.real
NAME=freevo-webserver
test -x $DAEMON || exit
if [ `id -u` = 0 ] ; then
#echo switching to freevo user
exec su --shell /bin/sh freevo -c "$0 $@"
fi
. /lib/lsb/init-functions
#These variables affect how freevo works, if you want to really set
# those, put them in /etc/default/freevo . See also /etc/freevo/debconf.sh
unset OS_LOGDIR FREEVO_LOGDIR OS_STATICDIR FREEVO_STATICDIR OS_CACHEDIR FREEVO_CACHEDIR FREEVO_SHARE FREEVO_CONTRIB FREEVO_SCRIPT FREEVO_CONFIG DISPLAY LD_PRELOAD SDL_VIDEODRIVER FREEVO_LOCALE FREEVO_PYTHON
# Default is to start nothing
START_FREEVO_WEBSERVER=0
test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
test -r /etc/default/freevo && . /etc/default/freevo
test "$START_FREEVO_WEBSERVER" = 1 || exit 0
test -x $DAEMON || exit 0
test "${NOMOUSE}" = "true" && export SDL_NOMOUSE=true
start_freevo_webserver() {
log_action_msg "Starting Freevo Home Theatre PC Platform (webserver)"
$DAEMON --daemon webserver
log_action_end_msg $?
}
stop_freevo_webserver() {
log_action_msg "Stopping Freevo Home Theatre PC Platform (webserver)"
$DAEMON --stop webserver
log_action_end_msg $?
}
restart_freevo_webserver() {
log_action_msg "Restarting Freevo Home Theatre PC Platform (webserver)"
$DAEMON --stop webserver
sleep 5
$DAEMON --daemon webserver
log_action_end_msg $?
}
case "$1" in
start)
start_freevo_webserver
;;
stop)
stop_freevo_webserver
;;
restart|reload|force-reload)
restart_freevo_webserver
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
|