Add a script to change files ownership

This commit is contained in:
flow.gunso
2019-04-09 10:38:09 +02:00
parent 2ef80aadca
commit c603941242

View File

@@ -0,0 +1,13 @@
#!/bin/bash
if [ -z $UID ] && [ -z $GID ]; then
groupadd -g $GID -o $UNAME ;\
useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME ;\
chown $UID.$GID -R /.seafile ;\
chown $UID.$GID -R /.supervisord ;\
chown $UID.$GID -R /volume ;\
chown $UID.$GID /entrypoint.sh ;\
chown $UID.$GID /infinite-seaf-cli-start.sh
else
echo "\$UID and \$GID environment variables are required to update files ownership."
fi