summaryrefslogtreecommitdiff
path: root/debian/echolot.init
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-10-17 03:58:43 +0000
committerPeter Palfrader <peter@palfrader.org>2003-10-17 03:58:43 +0000
commitdc6c2bc4c39f81b6aa503fe36989c386ecef7b64 (patch)
tree7f61f96b4dd314fe733e430f9d60e996f0db277d /debian/echolot.init
parent8bc9de7de69c6364defd16aeb2520e32fc457956 (diff)
Readd <command> init.d target
Diffstat (limited to 'debian/echolot.init')
-rwxr-xr-xdebian/echolot.init20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/echolot.init b/debian/echolot.init
index 101b75d..2161ace 100755
--- a/debian/echolot.init
+++ b/debian/echolot.init
@@ -134,6 +134,26 @@ reload|force-reload|restart)
wait_for_deaddaemon $PID
$0 start
;;
+process|add|delete|set|setremailercaps|deleteremailercaps|getkeyconf|sendpings|sendchainpings|buildstats|buildkeys|buildthesaurus|buildfromlines|dumpconf|summary)
+ # Check for right User
+ SU=""
+ if [ "$CHECKUID" -gt "0" ]; then
+ CUID=`id -u`
+ CUIDNAME=`id -nu`
+ if [ "$CUIDNAME" = "$USER" ]; then
+ SU=""
+ elif [ "$CUID" = "0" ]; then
+ SU="su $USER -c"
+ else
+ echo "You are neither $USER nor root. Aborting." >&2
+ exit 1;
+ fi
+ fi
+
+ echo "Running $DESC: $NAME $1..."
+ $SU $DAEMON "$@"
+ echo "done."
+ ;;
*)
echo "Usage: $0 (start|stop|reload|force-reload|restart)" >&2
echo " $0 <COMMAND> [parameters]" >&2