mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-24 13:36:29 +01:00
fix: auto-fix linting issues
This commit is contained in:
committed by
github-actions[bot]
parent
e5adbd266f
commit
f728166b14
@@ -8,7 +8,7 @@ set -e
|
||||
|
||||
echo "Cleaning files"
|
||||
for var in /data/config/nginx /data/config/crontabs /data/config/logs; do
|
||||
if [ -d "$var" ]; then rm -r "$var"; fi
|
||||
if [ -d "$var" ]; then rm -r "$var"; fi
|
||||
done
|
||||
|
||||
########################
|
||||
@@ -22,10 +22,10 @@ rootuser='root'
|
||||
|
||||
printf "Creating possible missing Directories\n"
|
||||
for folder in "$ocpath"/data "$ocpath"/assets "$ocpath"/updater "$ocpath"/apps "$ocpath"/assets "$ocpath"/config "$ocpath"/data "$ocpath"/themes /data/config/nextcloud/config /data/config/nextcloud/data /ssl/nextcloud/keys; do
|
||||
if [ ! -d "$folder" ]; then
|
||||
echo "... $folder"
|
||||
mkdir -p "$folder" || true
|
||||
fi
|
||||
if [ ! -d "$folder" ]; then
|
||||
echo "... $folder"
|
||||
mkdir -p "$folder" || true
|
||||
fi
|
||||
done
|
||||
|
||||
printf "chmod Files and Directories. This could take some time, please wait...\n"
|
||||
@@ -39,17 +39,17 @@ find "${ocpath}"/ -type d -exec chmod 0750 {} \;
|
||||
printf "chown Directories. This could take some time, please wait...\n"
|
||||
chown -R ${rootuser}:${htgroup} "${ocpath}"/
|
||||
for folder in "${ocpath}"/apps/ "${ocpath}"/assets/ "${ocpath}"/config/ "${ocpath}"/data/ "${ocpath}"/themes/ /ssl/nextcloud/keys; do
|
||||
chown -R ${htuser}:${htgroup} "$folder" || true
|
||||
chown -R ${htuser}:${htgroup} "$folder" || true
|
||||
done
|
||||
|
||||
printf "chmod/chown .htaccess\n"
|
||||
|
||||
if [ -f "${ocpath}"/.htaccess ]; then
|
||||
chmod 0644 "${ocpath}"/.htaccess
|
||||
chown "${rootuser}":"${htgroup}" "${ocpath}"/.htaccess
|
||||
chmod 0644 "${ocpath}"/.htaccess
|
||||
chown "${rootuser}":"${htgroup}" "${ocpath}"/.htaccess
|
||||
fi
|
||||
|
||||
if [ -f "${ocpath}"/data/.htaccess ]; then
|
||||
chmod 0644 "${ocpath}"/data/.htaccess
|
||||
chown "${rootuser}":"${htgroup}" "${ocpath}"/data/.htaccess
|
||||
chmod 0644 "${ocpath}"/data/.htaccess
|
||||
chown "${rootuser}":"${htgroup}" "${ocpath}"/data/.htaccess
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user