wok annotate virtualbox-ose-guestutils/stuff/VBoxService @ rev 20938
freeglut: added cmake to BUILD_DEPENDS
author | Hans-G?nter Theisgen |
---|---|
date | Sat Mar 02 17:38:46 2019 +0100 (2019-03-02) |
parents | 315d0dde6e3a |
children |
rev | line source |
---|---|
monghitri@14054 | 1 #!/bin/sh |
monghitri@14054 | 2 # /etc/init.d/VBoxService: Start, stop and restart VBoxService daemon on SliTaz, |
monghitri@14054 | 3 # at boot time or with the command line. Daemons options are configured |
monghitri@14054 | 4 # with /etc/daemons.conf |
monghitri@14054 | 5 # |
monghitri@14054 | 6 . /etc/init.d/rc.functions |
monghitri@14054 | 7 . /etc/daemons.conf |
monghitri@14054 | 8 |
monghitri@14054 | 9 NAME=VBoxService |
al@19159 | 10 DESC="$(_ 'VirtualBox Guest Service')" |
monghitri@14054 | 11 DAEMON=/usr/bin/VBoxService |
monghitri@14054 | 12 OPTIONS=$VBOXSERVICE_OPTIONS |
monghitri@14054 | 13 PIDFILE=/var/run/VBoxService.pid |
monghitri@14054 | 14 |
monghitri@14054 | 15 case "$1" in |
monghitri@14054 | 16 start) |
monghitri@14054 | 17 if active_pidfile $PIDFILE VBoxService ; then |
al@19159 | 18 _ '%s is already running.' $NAME |
monghitri@14054 | 19 exit 1 |
monghitri@14054 | 20 fi |
al@19159 | 21 action 'Starting %s: %s...' "$DESC" $NAME |
monghitri@14054 | 22 mkdir -p $(dirname $PIDFILE) |
monghitri@14054 | 23 $DAEMON $OPTIONS |
monghitri@14054 | 24 status ;; |
monghitri@14054 | 25 stop) |
monghitri@14054 | 26 if ! active_pidfile $PIDFILE VBoxService ; then |
al@19159 | 27 _ '%s is not running.' |
monghitri@14054 | 28 exit 1 |
monghitri@14054 | 29 fi |
al@19159 | 30 action 'Stopping %s: %s...' "$DESC" $NAME |
monghitri@14054 | 31 kill $(cat $PIDFILE) |
monghitri@14054 | 32 rm $PIDFILE |
monghitri@14054 | 33 status ;; |
monghitri@14054 | 34 restart) |
monghitri@14054 | 35 if ! active_pidfile $PIDFILE VBoxService ; then |
al@19159 | 36 _ '%s is not running.' $NAME |
monghitri@14054 | 37 exit 1 |
monghitri@14054 | 38 fi |
al@19159 | 39 action 'Restarting %s: %s...' "$DESC" $NAME |
monghitri@14054 | 40 kill $(cat $PIDFILE) |
monghitri@14054 | 41 rm $PIDFILE |
monghitri@14054 | 42 sleep 2 |
monghitri@14054 | 43 $DAEMON $OPTIONS |
monghitri@14054 | 44 status ;; |
monghitri@14054 | 45 *) |
al@19159 | 46 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" |
al@19159 | 47 newline |
monghitri@14054 | 48 exit 1 ;; |
monghitri@14054 | 49 esac |
monghitri@14054 | 50 |
monghitri@14054 | 51 exit 0 |