Create init

This commit is contained in:
Mike 2019-04-27 14:43:58 +08:00 committed by GitHub
parent 94510116f6
commit 77573867f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
docker/init Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# Create dockeruser user/group
addgroup -g $PGID dockeruser
adduser -D -u $PUID -G dockeruser -h /home/dockeruser dockeruser
chown $PUID:$PGID /home/dockeruser
# Change ownership of youtube-dl and set sticky bit so youtube-dl runs as dockeruser (rootless operation)
chown $PUID:$PGID `which youtube-dl`
chmod u+s,g+s `which youtube-dl`
# Ensure .netrc has correct permissions (if present)
chown root:root /root/.netrc
# Run youtube-dl with remainder of command line arguments
youtube-dl $@