Merge pull request #155 from linuxserver/format

Format shell scripts
This commit is contained in:
Eric Nemchik 2023-01-15 10:45:42 -06:00 committed by GitHub
commit d690e1d184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if [ -d /app/www-tmp ]; then
echo "New container detected. Setting up app folder and fixing permissions."
@ -123,7 +124,7 @@ fi
# check for the mysql endpoint
echo "Waiting for DB to be available"
END=$((SECONDS+30))
END=$((SECONDS + 30))
while [[ ${SECONDS} -lt ${END} ]] && [[ -n "${DB_HOST+x}" ]]; do
if [[ $(/usr/bin/nc -w1 "${DB_HOST}" "${DB_PORT}" | tr -d '\0') ]]; then
if [[ -n "${RUN}" ]]; then

View File

@ -1,2 +1,4 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec memcached -u abc

View File

@ -1,10 +1,11 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /var/www/html/public;"
NEW_ROOT="root /app/www/public;"
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}";then
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}"; then
echo "updating root in ${DEFAULT_CONF}"
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
fi