server/admin.c: Remove spurious `ping' in usage message.
[tripe] / contrib / tripe-upstart.in
index aa6e419..390f189 100644 (file)
@@ -1,6 +1,26 @@
 ### -*-conf-*-
 ###
 ### Upstart control script for tripe.
+###
+### (c) 2012 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Trivial IP Encryption (TrIPE).
+###
+### TrIPE is free software: you can redistribute it and/or modify it under
+### the terms of the GNU General Public License as published by the Free
+### Software Foundation; either version 3 of the License, or (at your
+### option) any later version.
+###
+### TrIPE is distributed in the hope that it will be useful, but WITHOUT
+### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+### for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with TrIPE.  If not, see <https://www.gnu.org/licenses/>.
 
 ###--------------------------------------------------------------------------
 ### Identification.
@@ -143,17 +163,22 @@ script
        export PATH TRIPEDIR TRIPESOCK TRIPE_SLIPIF
 
        ## Start the server, passing lots of arguments.
+       logopt=
+       case ${syslogp-nil} in nil) ;; *) logopt="$logopt -l" ;; esac
+       case ${logfile+t},${syslogp-nil} in
+         t,*) logopt="$logopt -f$logfile" ;;
+         ,nil) logopt="$logopt -f@logfile@" ;;
+       esac
        $tripectl -s -p$tripe \
-         -f${logfile-/var/log/tripe.log} \
          -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}
+         $logopt \
+         ${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
 
 end script