-
-
Notifications
You must be signed in to change notification settings - Fork 653
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: AdventureLog - update script bug #1334
Fix: AdventureLog - update script bug #1334
Conversation
Script validation❌ We found issues in the following changed files: Not executable:
Copyright header line missing or invalid:
License header line missing or invalid:
Source header line missing or invalid:
Script formatting❌ We found issues in the formatting of the following changed files: diff ct/checkmk.sh.orig ct/checkmk.sh
--- ct/checkmk.sh.orig
+++ ct/checkmk.sh
@@ -29,7 +29,7 @@
msg_error "No ${APP} Installation Found!"
exit
fi
- RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
+ RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}"
omd stop monitoring &>/dev/null
@@ -38,7 +38,7 @@
apt-get install -y /opt/checkmk.deb &>/dev/null
omd --force -V ${RELEASE}.cre update --conflict=install monitoring &>/dev/null
omd start monitoring &>/dev/null
- omd -f rm monitoringbackup &>/dev/null
+ omd -f rm monitoringbackup &>/dev/null
omd cleanup &>/dev/null
rm -rf /opt/checkmk.deb
msg_ok "Updated ${APP} to v${RELEASE}"
diff install/checkmk-install.sh.orig install/checkmk-install.sh
--- install/checkmk-install.sh.orig
+++ install/checkmk-install.sh
@@ -5,7 +5,6 @@
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
-
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
@@ -18,7 +17,7 @@
$STD apt-get install -y \
curl \
sudo \
- mc
+ mc
msg_ok "Installed Dependencies"
msg_info "Install Checkmk"
@@ -35,10 +34,10 @@
PASSWORD=$(omd create monitoring | grep "password:" | awk '{print $NF}')
$STD omd start
{
- echo "Application-Credentials"
- echo "Username: cmkadmin"
- echo "Password: $PASSWORD"
-} >> ~/checkmk.creds
+ echo "Application-Credentials"
+ echo "Username: cmkadmin"
+ echo "Password: $PASSWORD"
+} >>~/checkmk.creds
msg_ok "Created Service"
msg_info "Cleaning up" |
Co-authored-by: Michel Roegl-Brunner <[email protected]>
Co-authored-by: Michel Roegl-Brunner <[email protected]>
Co-authored-by: Michel Roegl-Brunner <[email protected]>
Co-authored-by: Michel Roegl-Brunner <[email protected]>
Co-authored-by: Michel Roegl-Brunner <[email protected]>
Now that this fix has been merged (thanks guys for your awesome dedication!), shall I run the script again in the host shell, or just run the "update" function in the existing container? Thanks guys |
It's the same. Unless you have not updated the “update” call, then it still uses ttecks repo |
The merged update does not work (LXC with adventurelog 0.7.1): ` ✔️ Services Stopped [ERROR] in line 46: exit code 0: while executing command mv /opt/AdventureLog-${RELEASE} /opt/adventurelog ` |
create an issue and mark @JesperDramsch |
✍️ Description
Adventure log wasn't updating correctly.
This fixes several things:
Fixes #1331
🛠️ Type of Change
Please check the relevant options:
✅ Prerequisites
The following steps must be completed for the pull request to be considered:
📋 Additional Information (optional)
Provide any extra context or screenshots about the feature or fix here.
I ran the code on my own installation. I made the design decision to keep prior files (sans media due to size) around as AdventureLog is changing quite a bit, which means I don't want to just
rm -rf
the old installation. But you can make the decision this would be more correct.