chiark / gitweb /
init/tripe-init.in, contrib/tripe-upstart.in: Reformat startup rune.
[tripe] / init / tripe-init.in
index 9f44d752045239500e7f16aa1db1811c73a99f92..7a21c4ad605df72b6d9c0854f500be88d4250397 100755 (executable)
@@ -134,16 +134,15 @@ case "$1" in
 
     ## Start the server, passing lots of arguments.
     $tripectl -D -s -p$tripe \
-      -f${logfile-@logfile@} \
       -P$pidfile \
-      ${keytag+-S-t}$keytag \
-      ${addr+-S-b}$addr \
-      ${port+-S-p}${port} \
-      ${user+-U}${user} \
-      ${group+-G}${group} \
-      ${trace+-S-T}${trace} \
-      ${tunnel+-S-n}${tunnel} \
-      ${miscopts}
+      -f${logfile-@logfile@} \
+      ${keytag+-S-t$keytag} \
+      ${addr+-S-b$addr} ${port+-S-p$port} \
+      ${user+-U$user} ${group+-G$group} \
+      ${sockmode+-S-m$sockmode} \
+      ${trace+-S-T$trace} \
+      ${tunnel+-S-n$tunnel} \
+      $miscopts
 
     ## Wait for the server to start up.  This doesn't usually take long.
     for i in 1 2 3 4 give-up; do
@@ -195,7 +194,7 @@ case "$1" in
     echo -n "Stopping TrIPE VPN daemon:"
 
     ## If there's no socket, it must have quit (probably nonviolently).
-    if test ! -S $TRIPESOCK; then
+    if (cd $TRIPEDIR && test ! -S $TRIPESOCK); then
       echo " not running"
 
     ## Ask it to die nicely.