wok-next diff virtualbox-ose/stuff/VBoxService @ rev 20930

pyaudio -> python-pyaudio
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Aug 23 07:07:52 2018 +0300 (2018-08-23)
parents 7f188676b59c
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/virtualbox-ose/stuff/VBoxService	Thu Aug 23 07:07:52 2018 +0300
     1.3 @@ -0,0 +1,51 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/VBoxService: Start, stop and restart VBoxService daemon on SliTaz,
     1.6 +# at boot time or with the command line. Daemons options are configured
     1.7 +# with /etc/daemons.conf
     1.8 +#
     1.9 +. /etc/init.d/rc.functions
    1.10 +. /etc/daemons.conf
    1.11 +
    1.12 +NAME=VBoxService
    1.13 +DESC="$(_ 'VirtualBox Guest Service')"
    1.14 +DAEMON=/usr/bin/VBoxService
    1.15 +OPTIONS=$VBOXSERVICE_OPTIONS
    1.16 +PIDFILE=/var/run/VBoxService.pid
    1.17 +
    1.18 +case "$1" in
    1.19 +	start)
    1.20 +		if active_pidfile $PIDFILE VBoxService ; then
    1.21 +			_ '%s is already running.' $NAME
    1.22 +			exit 1
    1.23 +		fi
    1.24 +		action 'Starting %s: %s...' "$DESC" $NAME
    1.25 +		mkdir -p $(dirname $PIDFILE)
    1.26 +		$DAEMON $OPTIONS
    1.27 +		status ;;
    1.28 +	stop)
    1.29 +		if ! active_pidfile $PIDFILE VBoxService ; then
    1.30 +			_ '%s is not running.'
    1.31 +			exit 1
    1.32 +		fi
    1.33 +		action 'Stopping %s: %s...' "$DESC" $NAME
    1.34 +		kill $(cat $PIDFILE)
    1.35 +		rm $PIDFILE
    1.36 +		status ;;
    1.37 +	restart)
    1.38 +		if ! active_pidfile $PIDFILE VBoxService ; then
    1.39 +			_ '%s is not running.' $NAME
    1.40 +			exit 1
    1.41 +		fi
    1.42 +		action 'Restarting %s: %s...' "$DESC" $NAME
    1.43 +		kill $(cat $PIDFILE)
    1.44 +		rm $PIDFILE
    1.45 +		sleep 2
    1.46 +		$DAEMON $OPTIONS
    1.47 +		status ;;
    1.48 +	*)
    1.49 +		emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.50 +		newline
    1.51 +		exit 1 ;;
    1.52 +esac
    1.53 +
    1.54 +exit 0