summaryrefslogtreecommitdiff
path: root/manualPorts/boinc-client/boinc.rc
diff options
context:
space:
mode:
Diffstat (limited to 'manualPorts/boinc-client/boinc.rc')
-rw-r--r--manualPorts/boinc-client/boinc.rc49
1 files changed, 49 insertions, 0 deletions
diff --git a/manualPorts/boinc-client/boinc.rc b/manualPorts/boinc-client/boinc.rc
new file mode 100644
index 0000000..d598ad6
--- /dev/null
+++ b/manualPorts/boinc-client/boinc.rc
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# /etc/rc.d/boinc: start/stop boinc daemon
+#
+
+# User settings here
+DAEMON=boinc
+OPTIONS=" --dir ###BOINC_HOME### --daemon"
+RUN_AS_USER=boinc
+
+# Check for configuration files
+# [ -f /etc/tor/torrc ] || exit 1
+
+# If you have to edit this section for this or any other
+# port useage let me know, with a patch or added lines,
+# or simplely e-mail me the altered file and I'll include the changes.
+
+RETVAL=0
+
+case $1 in
+start)
+ echo -n "Starting $DAEMON..."
+ su $RUN_AS_USER -c "/usr/bin/$DAEMON$OPTIONS" > /dev/null
+ RETVAL=$?
+ if [ $RETVAL = 0 ]; then
+ echo " done."
+ fi
+ ;;
+stop)
+ echo -n "Shutting down $DAEMON..."
+ killall -q /usr/bin/$DAEMON
+ RETVAL=$?
+ echo " done."
+ ;;
+restart)
+ $0 stop
+ sleep 5
+ $0 start
+ RETVAL=$?
+ ;;
+*)
+ echo "usage: $0 [start|stop|restart]"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
+
+# End of file