Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upload folder in listmonk LXC #515

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ct/listmonk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v

msg_info "Updating ${APP} to v${RELEASE}"
cd /opt
mv /opt/listmonk/ /opt/listmonk-backup
mkdir /opt/listmonk/
wget -q "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_amd64.tar.gz"
tar -xzf "listmonk_${RELEASE}_linux_amd64.tar.gz" -C /opt/listmonk
mv /opt/listmonk-backup/config.toml /opt/listmonk/config.toml
mv /opt/listmonk-backup/uploads /opt/listmonk/uploads
/opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml &>/dev/null
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
Expand All @@ -78,6 +82,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v

msg_info "Cleaning up"
rm -rf "/opt/listmonk_${RELEASE}_linux_amd64.tar.gz"
rm -rf /opt/listmonk-backup/
msg_ok "Cleaned"

msg_ok "Updated Successfully"
Expand Down
1 change: 1 addition & 0 deletions install/listmonk-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ msg_ok "Set up PostgreSQL"
msg_info "Installing listmonk"
cd /opt
mkdir /opt/listmonk
mkdir /opt/listmonk/uploads
RELEASE=$(curl -s https://api.github.com/repos/knadh/listmonk/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_amd64.tar.gz"
tar -xzf "listmonk_${RELEASE}_linux_amd64.tar.gz" -C /opt/listmonk
Expand Down