-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert #864 add && make it err and skipping perm check * Restore armv7 nightly * Update entrypoint.sh * simplify, always setup permission regardless uid
- Loading branch information
1 parent
3dfdbcb
commit ba0de7f
Showing
2 changed files
with
5 additions
and
15 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,17 +1,7 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
set -eu | ||
|
||
CMD="npm start && pm2 start" | ||
|
||
# if the first arg starts with "-" pass it to program | ||
if [ "${1#-}" != "$1" ]; then | ||
set -- "$CMD" "$@" | ||
fi | ||
|
||
# chown current working directory to current user | ||
if [ "$*" = "$CMD" ] && [ "$(id -u)" = "0" ]; then | ||
find . \! -user "$UID" -exec chown "$UID:$GID" -R '{}' + || echo "WARNING! Could not change directory ownership. If you manage permissions externally this is fine, otherwise you may experience issues when downloading or deleting videos." | ||
exec gosu "$UID:$GID" "$0" "$@" | ||
fi | ||
|
||
exec "$@" | ||
echo "[entrypoint] setup permission, this may take a while" | ||
find . \! -user "$UID" -exec chown "$UID:$GID" '{}' + || echo "WARNING! Could not change directory ownership. If you manage permissions externally this is fine, otherwise you may experience issues when downloading or deleting videos." | ||
exec gosu "$UID:$GID" "$@" |