From c66698fc2a620ce1c51338dd8d99df250465f051 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Fri, 15 Apr 2016 12:12:40 +0300 Subject: [PATCH] Fix consul logging for sysvinit provider --- templates/default/sysvinit.service.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/default/sysvinit.service.erb b/templates/default/sysvinit.service.erb index c861ee3f..f17bdcc1 100755 --- a/templates/default/sysvinit.service.erb +++ b/templates/default/sysvinit.service.erb @@ -35,7 +35,7 @@ _start() { start-stop-daemon --start --quiet --background \ --pidfile $pidfile<% unless @pid_file_external %> --make-pidfile<% end %> \ --chuid $user --chdir "<%= @directory %>" \ - --startas /bin/bash -- -c "exec $exec <%= @daemon_options %> >$logfile 2>&1" + --startas /bin/bash -- -c "exec $exec <%= @daemon_options %> >> $logfile 2>&1" } _stop() { @@ -64,7 +64,7 @@ _start() { daemon \ --pidfile=$pidfile \ --user=$user \ - " { $exec <%= @daemon_options %> &> $logfile & } ; echo \$! >| $pidfile " + " { $exec <%= @daemon_options %> &>> $logfile & } ; echo \$! >| $pidfile " RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile