mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 10:55:10 +00:00
Fix: AdventureLog - update script bug (#1334)
* refactor: move installation for backup and maintain media and env files * fix: return to working directory * Workdir Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Workdir Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Avoid Workdir Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Avoid Workdir Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Remove old installation (at request of @michelroegl-brunner) Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * rm newline * rm last version --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
parent
5af9dd9e45
commit
d56d8dd369
@ -40,19 +40,20 @@ function update_script() {
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cp /opt/adventurelog/backend/server/.env /opt/server.env
|
||||
cp /opt/adventurelog/frontend/.env /opt/frontend.env
|
||||
wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv AdventureLog-${RELEASE} /opt/adventurelog
|
||||
mv /opt/server.env /opt/adventurelog/backend/server/.env
|
||||
mv /opt/adventurelog/ /opt/adventurelog-backup/
|
||||
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
|
||||
cd /opt/adventurelog/backend/server
|
||||
pip install --upgrade pip &>/dev/null
|
||||
pip install -r requirements.txt &>/dev/null
|
||||
python3 manage.py collectstatic --noinput &>/dev/null
|
||||
python3 manage.py migrate &>/dev/null
|
||||
|
||||
mv /opt/frontend.env /opt/adventurelog/frontend/.env
|
||||
mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
|
||||
cd /opt/adventurelog/frontend
|
||||
pnpm install &>/dev/null
|
||||
pnpm run build &>/dev/null
|
||||
@ -65,7 +66,8 @@ function update_script() {
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf v${RELEASE}.zip
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/adventurelog-backup
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
@ -81,4 +83,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
|
Loading…
Reference in New Issue
Block a user