This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* revert changes corresponding the entrypoint-file * change ownership of created files with php
- Loading branch information
Bastian Rang
committed
Oct 11, 2017
1 parent
4eb234f
commit caecbdc
Showing
2 changed files
with
14 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
#!/bin/sh | ||
|
||
USER="root" | ||
if [ ! -z "$GROUP_ID" ] && [ ! -z "$USER_ID" ] ; then | ||
deluser rancherize > /dev/null 2>&1 | ||
addgroup -g $GROUP_ID rancherize | ||
adduser -u $USER_ID -G rancherize -D -s /bin/sh rancherize | ||
USER="rancherize" | ||
if [ "$1" = "sh" ] ; then | ||
shift 1 | ||
fi | ||
|
||
if type "$1" > /dev/null ; then | ||
su-exec "$USER" $* | ||
if type "$1" >/dev/null ; then | ||
exec $* | ||
exit $? | ||
fi | ||
|
||
su-exec "$USER" php /opt/rancherize/rancherize $@ | ||
exec php /opt/rancherize/rancherize $@ |