mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 10:55:10 +00:00
Compare commits
6 Commits
550efb5e30
...
4ddac3c1a6
Author | SHA1 | Date | |
---|---|---|---|
|
4ddac3c1a6 | ||
|
c5d7608a78 | ||
|
45ccdeef3f | ||
|
7e766cdf8e | ||
|
0235b1385b | ||
|
a11c5d86ec |
@ -41,11 +41,10 @@ function update_script() {
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
WORKDIR="$PWD"
|
||||
mv /opt/adventurelog/ /opt/adventurelog-backup/
|
||||
wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv AdventureLog-${RELEASE} /opt/adventurelog
|
||||
wget -qO /opt/v${RELEASE}.zip "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q /opt/v${RELEASE}.zip
|
||||
mv /opt/AdventureLog-${RELEASE} /opt/adventurelog
|
||||
|
||||
mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
|
||||
mv /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
|
||||
@ -55,13 +54,11 @@ function update_script() {
|
||||
python3 manage.py collectstatic --noinput &>/dev/null
|
||||
python3 manage.py migrate &>/dev/null
|
||||
|
||||
|
||||
mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
|
||||
cd /opt/adventurelog/frontend
|
||||
pnpm install &>/dev/null
|
||||
pnpm run build &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
cd "$WORKDIR"
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Services"
|
||||
@ -70,8 +67,8 @@ function update_script() {
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf v${RELEASE}.zip
|
||||
mv /opt/adventurelog-backup/ adventurelog-backup-$LAST_VERSION/ # Keep backup, since AdventureLog moves quickly and we want to avoid breaking changes with rm -rf
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/adventurelog-backup
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user