diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-08-21 19:42:43 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-08-21 19:42:43 +0000 |
commit | 17f714057a3e9042cd6ce7cdd324d4198ed3cc0b (patch) | |
tree | e0523690bf090395003593b3d0bdb3ced5c3d713 /tools/pingctl | |
parent | 58c3f95e5cae89ac790a7dfe4d0b4f317b0e1ba6 (diff) |
Further pingctl fixes
Diffstat (limited to 'tools/pingctl')
-rwxr-xr-x | tools/pingctl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/pingctl b/tools/pingctl index f175c76..02468f0 100755 --- a/tools/pingctl +++ b/tools/pingctl @@ -8,7 +8,7 @@ set -e ################################################################ # You perhaps want to change those items -USER=echolot +USER=pinger VERBOSE=0 PINGD="/home/pinger/echolot/pingd" @@ -71,13 +71,21 @@ case $1 in start) echo -n "Starting Echolot: pingd" - $SU $PINGD --detach $VERBOSE start + if [ ! -z "$SU" ]; then + $SU "$PINGD --detach $VERBOSE start" + else + $PINGD --detach $VERBOSE start + fi echo "." ;; stop) echo -n "Stopping Echolot: pingd" - $SU $PINGD stop + if [ ! -z "$SU" ]; then + $SU "$PINGD stop" + else + $PINGD stop + fi echo "." ;; @@ -88,7 +96,11 @@ reload|force-reload|restart) ;; process|add|delete|set|setremailercaps|deleteremailercaps|getkeyconf|buildstats|buildkeys|buildthesaurus|dumpconf) echo "Running pingd $1..." - $SU $PINGD "$@" + if [ ! -z "$SU" ]; then + $SU "$PINGD \"$@\"" + else + $PINGD "$@" + fi echo "done." ;; *) |