Skip to content

Commit

Permalink
Merge pull request #502 from syseleven/fix-sysv-init-centos6
Browse files Browse the repository at this point in the history
fix sysv init scripts
  • Loading branch information
bastelfreak authored Nov 22, 2020
2 parents 8df6dbb + aaf6046 commit f8b5ec7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/defines/daemon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
'owner' => 'root',
'group' => 'root'
).with_content(
%r{daemon --user=smurf_user \\\n --pidfile="\$PID_FILE" \\\n "\$DAEMON" '' >> "\$LOG_FILE" 2>&1 &}
%r{daemon --user=smurf_user \\\n --pidfile="\$PID_FILE" \\\n "'\$DAEMON' '' >> '\$LOG_FILE' 2>&1 &"}
)
}

Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/files/prometheus1.sysv
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ start() {
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=prometheus \
--pidfile="$PID_FILE" \
"$DAEMON" -log.format logger:stdout -config.file=/etc/prometheus/prometheus.yaml \
"'$DAEMON' -log.format logger:stdout -config.file=/etc/prometheus/prometheus.yaml \
-web.console.templates=/usr/local/share/prometheus/consoles \
-web.console.libraries=/usr/local/share/prometheus/console_libraries \
-storage.local.path=/var/lib/prometheus \
-storage.local.retention=360h \
>> "$LOG_FILE" &
>> '$LOG_FILE' 2>&1 &"
retcode=$?
mkpidfile
touch /var/lock/subsys/prometheus
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/files/prometheus2.sysv
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ start() {
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=prometheus \
--pidfile="$PID_FILE" \
"$DAEMON" --config.file=/etc/prometheus/prometheus.yaml \
"'$DAEMON' --config.file=/etc/prometheus/prometheus.yaml \
--web.console.templates=/usr/local/share/prometheus/consoles \
--web.console.libraries=/usr/local/share/prometheus/console_libraries \
--storage.tsdb.path=/var/lib/prometheus \
--storage.tsdb.retention=360h \
>> "$LOG_FILE" &
>> '$LOG_FILE' 2>&1 &"
retcode=$?
mkpidfile
touch /var/lock/subsys/prometheus
Expand Down
2 changes: 1 addition & 1 deletion templates/daemon.sysv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ start() {
daemon --user=<%= @user %> \
--pidfile="$PID_FILE" \
<%- require 'shellwords' -%>
"$DAEMON" <%= Shellwords.escape(@options) %> >> "$LOG_FILE" 2>&1 &
"'$DAEMON' <%= Shellwords.escape(@options) %> >> '$LOG_FILE' 2>&1 &"
retcode=$?
sleep 1
mkpidfile
Expand Down
4 changes: 2 additions & 2 deletions templates/prometheus.sysv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ start() {
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=<%= scope.lookupvar('prometheus::server::user') %> \
--pidfile="$PID_FILE" \
"$DAEMON" <%= @daemon_flags.join(" \\\n ") %> \
>> "$LOG_FILE" &
"'$DAEMON' <%= @daemon_flags.join(" \\\n ") %> \
>> '$LOG_FILE' 2>&1 &"
retcode=$?
mkpidfile
touch /var/lock/subsys/prometheus
Expand Down

0 comments on commit f8b5ec7

Please sign in to comment.