server/admin.c: Remove spurious `ping' in usage message.
[tripe] / contrib / tripe-upstart.in
index 42d15de..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,9 +163,15 @@ 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 \
          -P$pidfile \
-         -f${logfile-@logfile@} \
+         $logopt \
          ${keytag+-S-t$keytag} \
          ${addr+-S-b$addr} ${port+-S-p$port} \
          ${user+-U$user} ${group+-G$group} \