graphite: implement upgrade

for the moment, we wipe out the old data and start afresh. this is because
the graphite web app keeps changing quite drastically.
This commit is contained in:
Girish Ramakrishnan
2021-03-23 10:48:13 -07:00
parent 91a4ae90f2
commit 32f385741a
5 changed files with 56 additions and 60 deletions

View File

@@ -19,13 +19,17 @@ fi
addon="$1"
appid="${2:-}" # only valid for redis
if [[ "${addon}" != "postgresql" && "${addon}" != "mysql" && "${addon}" != "mongodb" && "${addon}" != "redis" ]]; then
echo "${addon} must be postgresql/mysql/mongodb/redis"
if [[ "${addon}" != "postgresql" && "${addon}" != "mysql" && "${addon}" != "mongodb" && "${addon}" != "redis" && "${addon}" != "graphite" ]]; then
echo "${addon} must be postgresql/mysql/mongodb/redis/graphite"
exit 1
fi
if [[ "${BOX_ENV}" == "cloudron" ]]; then
readonly addon_dir="${HOME}/platformdata/${addon}/${appid}"
if [[ "${addon}" == "graphite" ]]; then
readonly addon_dir="${HOME}/platformdata/graphite"
else
readonly addon_dir="${HOME}/platformdata/${addon}/${appid}"
fi
else
readonly addon_dir="${HOME}/.cloudron_test/platformdata/${addon}/${appid}"
fi