summaryrefslogtreecommitdiffstats
path: root/init-scripts/funcd
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2007-09-20 21:28:51 -0400
committerSeth Vidal <skvidal@fedoraproject.org>2007-09-20 21:28:51 -0400
commit8d168259f1cb0af25a7ee342bd1c32cd5bfdd424 (patch)
tree9c1d80b6da18a902b03ba7b21ec6bd0a60aabbfa /init-scripts/funcd
parenta83c4bcc40aae7c8b8058d831667ee1e07a969dc (diff)
parent98010f591948fb4bf297c1c0c32def42f766edca (diff)
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/func
* 'master' of ssh://git.fedoraproject.org/git/hosted/func: (27 commits) just a friendly reminder we are not vf_server, change I!*N domain Add virt module. Add test code for virt. add a very simple, very dumb commandline client: Remove messages.pot from po dir, since its automatically generated Get rid of extra / in module loading error pychecker cleanups Add po dir to git Prevent XMLRPC server from printing to console. Catch FuncException when the config file is missing and exit gracefully Implement a quickie service control module Removing VF items + misc cleanup Clean up some speclint warnings Baseobj bites the dust. remove all the --debug "try to run from the src tree" crap debug spew cleanup to protect the unwashed masses from foo poisoning fix up config_data to use ConfigParser correctly attempt to let us run with --debug flag to run from src checkout attempts at letting us run from a installed, or local modules ...
Diffstat (limited to 'init-scripts/funcd')
-rwxr-xr-xinit-scripts/funcd82
1 files changed, 82 insertions, 0 deletions
diff --git a/init-scripts/funcd b/init-scripts/funcd
new file mode 100755
index 0000000..4971feb
--- /dev/null
+++ b/init-scripts/funcd
@@ -0,0 +1,82 @@
+#!/bin/sh
+#
+# funcd Fedora Unified Network Control
+###################################
+
+# LSB header
+
+### BEGIN INIT INFO
+# Provides: funcd
+# Required-Start: network, xinetd, httpd
+# Default-Start: 3 4 5
+# Short-Description: Fedora Unified Network Control
+# Description: Crazy simple, secure remote management.
+### END INIT INFO
+
+# chkconfig header
+
+# chkconfig: 345 99 99
+# description: Crazy simple, secure remote management.
+#
+# processname: /usr/bin/funcd
+
+# Sanity checks.
+[ -x /usr/bin/funcd ] || exit 0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+SERVICE=funcd
+PROCESS=funcd
+CONFIG_ARGS=" "
+
+RETVAL=0
+
+start() {
+ echo -n $"Starting func daemon: "
+ daemon --check $SERVICE $PROCESS --daemon $CONFIG_ARGS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SERVICE
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping func daemon: "
+ killproc $PROCESS
+ RETVAL=$?
+ echo
+ if [ $RETVAL -eq 0 ]; then
+ rm -f /var/lock/subsys/$SERVICE
+ rm -f /var/run/$SERVICE.pid
+ fi
+}
+
+restart() {
+ stop
+ start
+}
+
+# See how we were called.
+case "$1" in
+ start|stop|restart)
+ $1
+ ;;
+ status)
+ status $PROCESS
+ RETVAL=$?
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$SERVICE ] && restart || :
+ ;;
+ reload)
+ echo "can't reload configuration, you have to restart it"
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ exit 1
+ ;;
+esac
+exit $RETVAL
+