mirror of
				https://github.com/linuxserver/docker-heimdall.git
				synced 2025-10-31 13:07:39 +09:00 
			
		
		
		
	Adjust file ownership
This commit is contained in:
		| @@ -43,9 +43,7 @@ RUN \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdall.tar.gz -C \ | ||||
|     /app/www --strip-components=1 && \ | ||||
|   cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   chown -R abc:abc \ | ||||
|     /app/www && \ | ||||
|   mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   rm -rf \ | ||||
|     /tmp/* | ||||
|   | ||||
| @@ -43,9 +43,7 @@ RUN \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdall.tar.gz -C \ | ||||
|     /app/www --strip-components=1 && \ | ||||
|   cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   chown -R abc:abc \ | ||||
|     /app/www && \ | ||||
|   mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   rm -rf \ | ||||
|     /tmp/* | ||||
|   | ||||
| @@ -43,9 +43,7 @@ RUN \ | ||||
|   tar xf \ | ||||
|     /tmp/heimdall.tar.gz -C \ | ||||
|     /app/www --strip-components=1 && \ | ||||
|   cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   chown -R abc:abc \ | ||||
|     /app/www && \ | ||||
|   mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \ | ||||
|   echo "**** cleanup ****" && \ | ||||
|   rm -rf \ | ||||
|     /tmp/* | ||||
|   | ||||
| @@ -3,6 +3,7 @@ | ||||
|  | ||||
| # make our folders | ||||
| mkdir -p \ | ||||
|     /app/www/bootstrap/cache \ | ||||
|     /config/www/{avatars,backgrounds,icons,logs,SupportedApps} \ | ||||
|     /config/log/heimdall | ||||
|  | ||||
| @@ -19,19 +20,27 @@ symlinks=( | ||||
| for i in "${symlinks[@]}"; do | ||||
|     if [[ -e "${i}" && ! -L "${i}" ]]; then | ||||
|         rm -rf "${i}" | ||||
|         if [[ -d /config/www/"$(basename "${i}")" ]]; then | ||||
|             lsiown -R abc:abc /config/www/"$(basename "${i}")" | ||||
|         fi | ||||
|     fi | ||||
|     if [[ ! -L "${i}" ]]; then | ||||
|         ln -s /config/www/"$(basename "${i}")" "${i}" | ||||
|     fi | ||||
|     if [[ -d /config/www/"$(basename "${i}")" ]]; then | ||||
|         lsiown abc:abc /config/www/"$(basename "${i}")" | ||||
|     fi | ||||
| done | ||||
|  | ||||
| # set permissions on new container | ||||
| if [[ ! -f /config/www/searchproviders.yaml ]]; then | ||||
|     echo "New container detected, setting permissions" | ||||
|     lsiown -R abc:abc \ | ||||
|         /app \ | ||||
|         /config | ||||
| fi | ||||
|  | ||||
| # copy searchproviders if not exists and symlink | ||||
| if [[ ! -f /config/www/searchproviders.yaml ]]; then | ||||
|     cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml | ||||
|     lsiown -R abc:abc /config/www/searchproviders.yaml | ||||
|     lsiown abc:abc /config/www/searchproviders.yaml | ||||
| fi | ||||
| rm -rf /app/www/storage/app/searchproviders.yaml | ||||
| ln -s /config/www/searchproviders.yaml /app/www/storage/app/searchproviders.yaml | ||||
|   | ||||
		Reference in New Issue
	
	Block a user