-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverted PUID and PGID implementations (#222)
- Loading branch information
Showing
1 changed file
with
2 additions
and
12 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 |
---|---|---|
@@ -1,19 +1,9 @@ | ||
#!/bin/sh | ||
PUID=${PUID:-1000} | ||
PGID=${PGID:-1000} | ||
UMASK=${UMASK:-022} | ||
echo ' | ||
==================================================== | ||
To support this project, please consider sponsoring. | ||
https://github.com/sponsors/mandarons | ||
https://www.buymeacoffee.com/mandarons | ||
https://www.buymeacoffee.com/mandarons | ||
==================================================== | ||
' | ||
echo "Using UID as ${PUID}, GID as ${PGID} and UMASK as ${UMASK}..." | ||
addgroup --gid $PGID icd; | ||
adduser -D --uid $PUID icd -G icd; \ | ||
echo "icd ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/icd && sudo chmod 0440 /etc/sudoers.d/icd | ||
echo "Changing ownership of /app ... This operation may take significantly longer depending on number of files in your local copy of icloud." | ||
chown -R icd:icd /app | ||
umask $UMASK | ||
su - icd -c "umask $UMASK && cd /app && export PYTHONPATH=/app && export PATH=/venv/bin:$PATH && python ./src/main.py" | ||
cd /app && export PYTHONPATH=/app && export PATH=/venv/bin:$PATH && python ./src/main.py |