Skip to content

Commit

Permalink
Chdir in chroot for upstart 0.x, compatible service stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
excieve authored and buger committed Jan 29, 2018
1 parent ebc8130 commit 9e12515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install/inits/upstart/init/0.x/tyk-pump.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ script
[ -r /etc/default/tyk-sink ] && . /etc/default/tyk-pump
[ -r /etc/sysconfig/tyk-sink ] && . /etc/sysconfig/tyk-pump
set +a
exec chroot --userspec tyk:tyk / /opt/tyk-pump/tyk-pump -c /opt/tyk-pump/pump.conf >> /var/log/tyk-pump.stdout 2>> /var/log/tyk-pump.stderr
exec chroot --userspec tyk:tyk / sh -c "cd /opt/tyk-pump; exec /opt/tyk-pump/tyk-pump -c /opt/tyk-pump/pump.conf" >> /var/log/tyk-pump.stdout 2>> /var/log/tyk-pump.stderr
end script
2 changes: 1 addition & 1 deletion install/post_remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
if [ -f "/etc/init/tyk-pump.conf" ]; then
echo "Found upstart"
echo "Stopping the service"
service tyk-pump stop
stop tyk-pump
echo "Removing the service"
rm /etc/init/tyk-pump.conf
fi
Expand Down

0 comments on commit 9e12515

Please sign in to comment.