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.
This adds a "tyk" user and group for DEB and RPM packages so that package files and directories would be owned by it and the process run with its effective uid and gid. Appropriate changes made to build scripts and init configs. In addition to this PID now has to reside in its own sub-rundir due to this change, so that's created (and additionally managed by systemd where it's available), default pidfile location changed appropriately so that upgrade wouldn't require any config changes by the users. The gateway config file is now only readable and writable by the "tyk" user/group. The build and push scripts allow manually assigning a version based on an environment variable, which is useful for unstable packaging (e.g. based on git revision ID). Doesn't remove "default" init system files on upgrade/remove anymore as it's now a way for users to run the process with custom environment variables, hence sort of a config file. Does a bunch of fixes on the packaging and init scripts (e.g. fixes RPM upgrades removing init scripts on upgrade). Removes old stuff. Adds Ubuntu 16.04 LTS (Xenial) package to PackageCloud.
- Loading branch information
Showing
25 changed files
with
203 additions
and
532 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
echo "Creating user and group..." | ||
GROUPNAME="tyk" | ||
USERNAME="tyk" | ||
|
||
getent group "$GROUPNAME" >/dev/null || groupadd -r "$GROUPNAME" | ||
getent passwd "$USERNAME" >/dev/null || useradd -r -g "$GROUPNAME" -M -s /sbin/nologin -c "Tyk service user" "$USERNAME" |
Empty file.
This file was deleted.
Oops, something went wrong.
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
5 changes: 2 additions & 3 deletions
5
install/inits/sysv/etc/default/tyk-gateway → install/inits/sysv/default/tyk-gateway
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
user="root" | ||
group="root" | ||
user="tyk" | ||
group="tyk" | ||
chroot="/" | ||
chdir="/opt/tyk-gateway" | ||
nice="" | ||
|
5 changes: 2 additions & 3 deletions
5
...ll/inits/sysv/etc/default/tyk-gateway-lua → install/inits/sysv/default/tyk-gateway-lua
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
user="root" | ||
group="root" | ||
user="tyk" | ||
group="tyk" | ||
chroot="/" | ||
chdir="/opt/tyk-gateway" | ||
nice="" | ||
|
5 changes: 2 additions & 3 deletions
5
...inits/sysv/etc/default/tyk-gateway-python → ...all/inits/sysv/default/tyk-gateway-python
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
user="root" | ||
group="root" | ||
user="tyk" | ||
group="tyk" | ||
chroot="/" | ||
chdir="/opt/tyk-gateway" | ||
nice="" | ||
|
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
Empty file.
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
Oops, something went wrong.