From ff0071716aa6bf9100e49508b815da77cb735942 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 26 Jul 2012 05:55:03 -0300 Subject: virtualbox-libre: adding free patches and free distros icons --- libre/virtualbox-libre/vboxservice.rc | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 libre/virtualbox-libre/vboxservice.rc (limited to 'libre/virtualbox-libre/vboxservice.rc') diff --git a/libre/virtualbox-libre/vboxservice.rc b/libre/virtualbox-libre/vboxservice.rc new file mode 100644 index 000000000..5a62d69a3 --- /dev/null +++ b/libre/virtualbox-libre/vboxservice.rc @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +name=VBoxService +PID=$(pidof -o %PPID $name) + +case "$1" in + start) + stat_busy 'Starting VirtualBox Guest Service' + [[ -z "$PID" ]] && ${name} $VBOX_SERVICE_OPTION &>/dev/null \ + && { add_daemon ${0##*/}; stat_done; } \ + || { stat_fail; exit 1; } + ;; + stop) + stat_busy 'Stopping VirtualBox Guest Service' + [[ -n "$PID" ]] && kill $PID &>/dev/null \ + && { rm_daemon ${0##*/}; stat_done; } \ + || { stat_fail; exit 1; } + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + status) + stat_busy 'Checking VirtualBox Guest Service status' + ck_status ${0##*/} + ;; + *) + echo "usage: ${0##*/} {start|stop|restart|status}" >&2 + exit 1 +esac + +exit 0 + +# vim:set ts=2 sw=2 ft=sh et: -- cgit v1.2.3