File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
6666
6767 msg_info " Updating ${APP} to v${RELEASE} "
6868 cd /opt
69+ mv /opt/listmonk/ /opt/listmonk-backup
70+ mkdir /opt/listmonk/
6971 wget -q " https://github.com/knadh/listmonk/releases/download/v${RELEASE} /listmonk_${RELEASE} _linux_amd64.tar.gz"
7072 tar -xzf " listmonk_${RELEASE} _linux_amd64.tar.gz" -C /opt/listmonk
73+ mv /opt/listmonk-backup/config.toml /opt/listmonk/config.toml
74+ mv /opt/listmonk-backup/uploads /opt/listmonk/uploads
7175 /opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml & > /dev/null
7276 echo " ${RELEASE} " > /opt/${APP} _version.txt
7377 msg_ok " Updated $APP to v${RELEASE} "
@@ -78,6 +82,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
7882
7983 msg_info " Cleaning up"
8084 rm -rf " /opt/listmonk_${RELEASE} _linux_amd64.tar.gz"
85+ rm -rf /opt/listmonk-backup/
8186 msg_ok " Cleaned"
8287
8388 msg_ok " Updated Successfully"
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ msg_ok "Set up PostgreSQL"
3838msg_info " Installing listmonk"
3939cd /opt
4040mkdir /opt/listmonk
41+ mkdir /opt/listmonk/uploads
4142RELEASE=$( curl -s https://api.github.com/repos/knadh/listmonk/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
4243wget -q " https://github.com/knadh/listmonk/releases/download/v${RELEASE} /listmonk_${RELEASE} _linux_amd64.tar.gz"
4344tar -xzf " listmonk_${RELEASE} _linux_amd64.tar.gz" -C /opt/listmonk
You can’t perform that action at this time.
0 commit comments