mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-03-03 12:20:03 +00:00
Fixed issues after PR review
This commit is contained in:
parent
cb147cd5a7
commit
6133bdc42c
@ -60,12 +60,11 @@ if [[ ! -f /etc/systemd/system/listmonk.service ]]; then msg_error "No ${APP} In
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/knadh/listmonk/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop listmonk
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
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
|
||||
@ -78,7 +77,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -r "/opt/listmonk_${RELEASE}_linux_amd64.tar.gz"
|
||||
rm -rf "/opt/listmonk_${RELEASE}_linux_amd64.tar.gz"
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_ok "Updated Successfully"
|
||||
|
@ -27,7 +27,7 @@ DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||
{
|
||||
echo "listmonk Database Credentials"
|
||||
echo "listmonk-Credentials"
|
||||
echo -e "listmonk Database User: \e[32m$DB_USER\e[0m"
|
||||
echo -e "listmonk Database Password: \e[32m$DB_PASS\e[0m"
|
||||
echo -e "listmonk Database Name: \e[32m$DB_NAME\e[0m"
|
||||
@ -42,8 +42,7 @@ wget -q "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmon
|
||||
tar -xzf "listmonk_${RELEASE}_linux_amd64.tar.gz" -C /opt/listmonk
|
||||
|
||||
$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml
|
||||
sed -i 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' /opt/listmonk/config.toml
|
||||
sed -i 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml
|
||||
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml
|
||||
$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml
|
||||
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
@ -72,7 +71,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -r "/opt/listmonk_${RELEASE}_linux_amd64.tar.gz"
|
||||
rm -rf "/opt/listmonk_${RELEASE}_linux_amd64.tar.gz"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
Loading…
Reference in New Issue
Block a user