mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 11:05:41 -04:00
21 lines
562 B
Plaintext
21 lines
562 B
Plaintext
#!/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"
|