summaryrefslogtreecommitdiff
path: root/misc/g15daemon/rc.g15daemon
diff options
context:
space:
mode:
authorAlan Alberghini <414N@slacky.it>2011-09-07 23:15:17 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-21 19:48:31 -0300
commit5956ee581d602e2cadcc7d24fb7d9958040480d4 (patch)
tree565e4df6d456034a0c671fb3ea48b39175dfa691 /misc/g15daemon/rc.g15daemon
parentf640bfb8573e7cf161d8f1ac0a368cadc81eb3e5 (diff)
downloadslackbuilds-5956ee581d602e2cadcc7d24fb7d9958040480d4.tar.gz
misc/g15daemon: Patch to fix Gn keys and suspend fixes.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'misc/g15daemon/rc.g15daemon')
-rw-r--r--misc/g15daemon/rc.g15daemon22
1 files changed, 17 insertions, 5 deletions
diff --git a/misc/g15daemon/rc.g15daemon b/misc/g15daemon/rc.g15daemon
index 9bf247b831..b86efa03d4 100644
--- a/misc/g15daemon/rc.g15daemon
+++ b/misc/g15daemon/rc.g15daemon
@@ -2,7 +2,7 @@
# rc script to start/stop g15daemon.
-# Copyright 2009 Alan Alberghini <414N@slacky.it>
+# Copyright 2011 Alan Alberghini <414N@slacky.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,23 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+G15DAEMON_PATH=/usr/sbin/g15daemon
+. /etc/rc.d/rc.g15daemon.conf
+NUM_PLUGINS=${#PLUGINS[*]}
+
function start()
{
echo -n "Starting g15daemon..."
- /usr/sbin/g15daemon
+ "$G15DAEMON_PATH"
+ if [ $NUM_PLUGINS -gt 0 ]
+ then
+ ( sleep 2 # Need a little time for g15daemon to settle
+ for I in $(seq 0 $NUM_PLUGINS)
+ do
+ ${PLUGINS[$I]} ${PLUGIN_PARAMS[$I]} &>/dev/null &
+ done ) &
+ fi
+ echo -ne "Done!\n"
}
function stop()
@@ -34,10 +47,9 @@ function stop()
if [ $(pidof g15daemon) ]
then
/usr/sbin/g15daemon -k
- return 0
+ echo -ne "Done!\n"
else
- echo "Failed! g15daemon not running!"
- return 1
+ echo -ne "Failed! g15daemon not running!\n"
fi
}