3 Commits

2 changed files with 14 additions and 4 deletions
+1
View File
@@ -25,6 +25,7 @@ RUN addgroup --gid ${GID} www-docker \
RUN apk --update --no-cache add \ RUN apk --update --no-cache add \
libcap \ libcap \
openssl \ openssl \
&& apk --update --no-cache upgrade \
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
&& cd /usr/share/nginx \ && cd /usr/share/nginx \
&& rm -rf html/* \ && rm -rf html/* \
+13 -4
View File
@@ -25,6 +25,15 @@ okNotify() {
printf "%s[OK]%s\n" "$ok" "$norm" printf "%s[OK]%s\n" "$ok" "$norm"
} }
makeDirectory() {
if ! [ -d "./$1" ]; then
if ! mkdir "./$1" >/dev/null 2>&1; then
errMsgString="Unable to make '$1' directory."
errMsg "$errMsgString" 40
fi
fi
}
scriptHelp() { scriptHelp() {
textNewline textNewline
textBlock "Update ${containerName} container and helper script files" textBlock "Update ${containerName} container and helper script files"
@@ -203,10 +212,10 @@ if [ "$doScriptUpdate" -eq 1 ]; then
fi fi
## update files ## update files
# ensure directories exist makeDirectory "config"
if ! mkdir config sites snippets >/dev/null 2>&1; then makeDirectory "sites"
errMsg "Unable to make directories in which to place updated files." 40 makeDirectory "snippets"
fi
while IFS=' ' read -r field1 field2; do while IFS=' ' read -r field1 field2; do
if [ "$field2" = "update.sh" ]; then continue; fi if [ "$field2" = "update.sh" ]; then continue; fi
printf "\nChecking '%s' for updates... " "$field2" printf "\nChecking '%s' for updates... " "$field2"