run-in-pagsh: Use $HOME rather than "~" so that paths can be quoted
[clinton/scripts.git] / run-in-pagsh
index f354c0e..3d4f6cb 100755 (executable)
@@ -22,13 +22,13 @@ if test -z "$2"; then
     echo "Error: not enough arguments."
     echo "Usage: run-in-pagsh name command [arguments] ..."
     exit 1
-elif test ! -d "~/.run"; then
+elif test ! -d "$HOME/.run"; then
     echo "Error: the ~/.run directory must exist before running this script."
     exit 1
 fi
 
 # Use a different PID file for each program.
-K5PID=~/.run/$1.pid
+K5PID=$HOME/.run/$1.pid
 
 # The command to run.
 shift
@@ -40,7 +40,7 @@ KTAB=/etc/keytabs/user.daemon/$USER
 # Terminate current k5start process, if one is running.
 if test -f "$K5PID"; then
     kill `cat -- "$K5PID"`
-    k5start -qtU -f "$KTAB" -- rm -f "$K5PID"
+    /usr/bin/k5start -qtU -f "$KTAB" -- rm -f "$K5PID"
 fi
 
 # Start fresh k5start daemon which will be refreshing tickets every 540 min