forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Upstart version detection and separate conf, fixes sysv script, …
…compatible service stopping
- Loading branch information
Showing
14 changed files
with
119 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
description "Tyk API Gateway (Lua)" | ||
start on filesystem or runlevel [2345] | ||
stop on runlevel [!2345] | ||
|
||
respawn | ||
umask 022 | ||
#nice | ||
#chroot / | ||
chdir /opt/tyk-gateway/ | ||
#limit core <softlimit> <hardlimit> | ||
#limit cpu <softlimit> <hardlimit> | ||
#limit data <softlimit> <hardlimit> | ||
#limit fsize <softlimit> <hardlimit> | ||
#limit memlock <softlimit> <hardlimit> | ||
#limit msgqueue <softlimit> <hardlimit> | ||
#limit nice <softlimit> <hardlimit> | ||
#limit nofile <softlimit> <hardlimit> | ||
#limit nproc <softlimit> <hardlimit> | ||
#limit rss <softlimit> <hardlimit> | ||
#limit rtprio <softlimit> <hardlimit> | ||
#limit sigpending <softlimit> <hardlimit> | ||
#limit stack <softlimit> <hardlimit> | ||
|
||
script | ||
# When loading default and sysconfig files, we use `set -a` to make | ||
# all variables automatically into environment variables. | ||
set -a | ||
[ -r /etc/default/tyk-gateway ] && . /etc/default/tyk-gateway | ||
[ -r /etc/sysconfig/tyk-gateway ] && . /etc/sysconfig/tyk-gateway | ||
set +a | ||
exec chroot --userspec root:root / sh -c "cd /opt/tyk-gateway; exec /opt/tyk-gateway/tyk-lua --conf /opt/tyk-gateway/tyk.conf" >> /var/log/tyk-gateway.stdout 2>> /var/log/tyk-gateway.stderr | ||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
description "Tyk API Gateway (Python)" | ||
start on filesystem or runlevel [2345] | ||
stop on runlevel [!2345] | ||
|
||
respawn | ||
umask 022 | ||
#nice | ||
#chroot / | ||
chdir /opt/tyk-gateway/ | ||
#limit core <softlimit> <hardlimit> | ||
#limit cpu <softlimit> <hardlimit> | ||
#limit data <softlimit> <hardlimit> | ||
#limit fsize <softlimit> <hardlimit> | ||
#limit memlock <softlimit> <hardlimit> | ||
#limit msgqueue <softlimit> <hardlimit> | ||
#limit nice <softlimit> <hardlimit> | ||
#limit nofile <softlimit> <hardlimit> | ||
#limit nproc <softlimit> <hardlimit> | ||
#limit rss <softlimit> <hardlimit> | ||
#limit rtprio <softlimit> <hardlimit> | ||
#limit sigpending <softlimit> <hardlimit> | ||
#limit stack <softlimit> <hardlimit> | ||
|
||
script | ||
# When loading default and sysconfig files, we use `set -a` to make | ||
# all variables automatically into environment variables. | ||
set -a | ||
[ -r /etc/default/tyk-gateway ] && . /etc/default/tyk-gateway | ||
[ -r /etc/sysconfig/tyk-gateway ] && . /etc/sysconfig/tyk-gateway | ||
set +a | ||
exec chroot --userspec root:root / sh -c "cd /opt/tyk-gateway; exec /opt/tyk-gateway/tyk-python --conf /opt/tyk-gateway/tyk.conf" >> /var/log/tyk-gateway.stdout 2>> /var/log/tyk-gateway.stderr | ||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
description "Tyk API Gateway" | ||
start on filesystem or runlevel [2345] | ||
stop on runlevel [!2345] | ||
|
||
respawn | ||
umask 022 | ||
#nice | ||
#chroot / | ||
chdir /opt/tyk-gateway/ | ||
#limit core <softlimit> <hardlimit> | ||
#limit cpu <softlimit> <hardlimit> | ||
#limit data <softlimit> <hardlimit> | ||
#limit fsize <softlimit> <hardlimit> | ||
#limit memlock <softlimit> <hardlimit> | ||
#limit msgqueue <softlimit> <hardlimit> | ||
#limit nice <softlimit> <hardlimit> | ||
#limit nofile <softlimit> <hardlimit> | ||
#limit nproc <softlimit> <hardlimit> | ||
#limit rss <softlimit> <hardlimit> | ||
#limit rtprio <softlimit> <hardlimit> | ||
#limit sigpending <softlimit> <hardlimit> | ||
#limit stack <softlimit> <hardlimit> | ||
|
||
script | ||
# When loading default and sysconfig files, we use `set -a` to make | ||
# all variables automatically into environment variables. | ||
set -a | ||
[ -r /etc/default/tyk-gateway ] && . /etc/default/tyk-gateway | ||
[ -r /etc/sysconfig/tyk-gateway ] && . /etc/sysconfig/tyk-gateway | ||
set +a | ||
exec chroot --userspec root:root / sh -c "cd /opt/tyk-gateway; exec /opt/tyk-gateway/tyk --conf /opt/tyk-gateway/tyk.conf" >> /var/log/tyk-gateway.stdout 2>> /var/log/tyk-gateway.stderr | ||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters