mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 06:25:41 -04:00
Initial upload
This commit is contained in:
20
root/migrations/01-nginx-site-confs-default
Normal file
20
root/migrations/01-nginx-site-confs-default
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
migrate() {
|
||||
local OLD_LOCATION="${1}"
|
||||
local NEW_LOCATION="${2}"
|
||||
|
||||
if [[ -f ${OLD_LOCATION} ]]; then
|
||||
echo "found ${OLD_LOCATION}"
|
||||
if [[ ! -f ${NEW_LOCATION} ]]; then
|
||||
echo "moving to ${NEW_LOCATION}"
|
||||
mv "${OLD_LOCATION}" "${NEW_LOCATION}"
|
||||
else
|
||||
echo "new file location already exists ${NEW_LOCATION}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# rename default to default.conf
|
||||
migrate "/config/nginx/site-confs/default" "/config/nginx/site-confs/default.conf"
|
||||
Reference in New Issue
Block a user