/etc/init.d/freevo_xserver 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 82 83 84 85 86 87 88 | #! /bin/sh
### BEGIN INIT INFO
# Provides: freevo-xserver
# Required-Start: $remote_fs $time
# Required-Stop: $remote_fs $time
# Should-Start: acpid dbus hal
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the Freevo Home Theatre PC Platform
# Description:
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/freevo.real
DAEMONLOG=/usr/share/freevo/contrib/freevo+log
test -x $DAEMON || exit
if [ ! `id -u` = 0 ] ; then
echo This script must be run as root
exit 1
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_XSERVER=0
test -r /etc/freevo/debconf.sh && . /etc/freevo/debconf.sh
test -r /etc/default/freevo && . /etc/default/freevo
test "$START_FREEVO_XSERVER" = 1 || exit 0
test -x $DAEMON || exit 0
test "${NOMOUSE}" = "true" && export SDL_NOMOUSE=true
startx_freevo() {
openvt -f -c 9 -- su --shell /bin/sh freevo -c "startx $DAEMONLOG -- :1 vt9 -quiet"
}
start_freevo() {
log_action_msg "Starting Freevo Home Theatre PC Platform (frontend)"
startx_freevo
log_action_end_msg $?
}
stop_freevo() {
log_action_msg "Stopping Freevo Home Theatre PC Platform (frontend)"
su --shell /bin/sh freevo -c "$DAEMON --stop"
log_action_end_msg $?
}
restart_freevo() {
log_action_msg "Restarting Freevo Home Theatre PC Platform (frontend)"
su --shell /bin/sh freevo -c "$DAEMON --stop"
sleep 5
startx_freevo
log_action_end_msg $?
}
case "$1" in
start)
start_freevo
;;
stop)
stop_freevo
;;
restart|force-reload)
restart_freevo
;;
reload)
#FIXME doing nothing
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
|