Compare commits

..

No commits in common. "775ed987db4ec1071ef3f90621fc350faec72352" and "757727537bd56471dc64e6d94ea79a0a95edb81f" have entirely different histories.

5 changed files with 18 additions and 172 deletions

View File

@ -7,7 +7,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/d
# App Default Values # App Default Values
APP="Bookstack" APP="Bookstack"
TAGS="organizer" var_tags="organizer"
var_cpu="1" var_cpu="1"
var_ram="1024" var_ram="1024"
var_disk="4" var_disk="4"
@ -37,38 +37,29 @@ function update_script() {
msg_info "Stopping Apache2" msg_info "Stopping Apache2"
systemctl stop apache2 systemctl stop apache2
msg_ok "Services Stopped" msg_ok "Services Stopped"
msg_info "Updating ${APP} to v${RELEASE}" msg_info "Updating ${APP} to ${RELEASE}"
mv /opt/bookstack /opt/bookstack-backup cp /opt/bookstack/.env /opt/.env
wget -q --directory-prefix=/opt "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" wget -q "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip"
mv /opt/BookStack-${RELEASE} /opt/bookstack unzip -q v${RELEASE}.zip
cp /opt/bookstack-backup/.env /opt/bookstack/.env mv BookStack-${RELEASE} /opt/bookstack
cp /opt/bookstack-backup/.env /opt/bookstack/.env mv /opt/.env /opt/bookstack/.env
cp -r /opt/bookstack-backup/public/uploads/ /opt/bookstack/public/uploads
cp -r /opt/bookstack-backup/storage/uploads/ /opt/bookstack/storage/uploads
cp -r /opt/bookstack-backup/themes/ /opt/bookstack/themes
cd /opt/bookstack
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null
php artisan key:generate --force &>/dev/null php artisan key:generate &>/dev/null
php artisan migrate --force &>/dev/null php artisan migrate &>/dev/null
chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
chmod -R 775 /opt/bookstack/storage /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads
chmod -R 640 /opt/bookstack/.env
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to v${RELEASE}" msg_ok "Updated ${APP}"
msg_info "Starting Apache2" msg_info "Starting Apache2"
systemctl start apache2 systemctl start apache2
msg_ok "Started Apache2" msg_ok "Started Apache2"
msg_info "Cleaning Up" msg_info "Cleaning Up"
rm -rf /opt/bookstack-backup rm -rf v${RELEASE}.zip
rm -rf /opt/v${RELEASE}.zip
msg_ok "Cleaned" msg_ok "Cleaned"
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
else else
msg_ok "No update required. ${APP} is already at v${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit exit
} }
@ -79,4 +70,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@ -1,62 +0,0 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/misc/build.func)
# Copyright (c) 2021-2024 community-scripts ORG
# Author: Michel Roegl-Brunner (michelroegl-brunner)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://checkmk.com/
# App Default Values
APP="checkmk"
var_tags="monitoring"
var_cpu="2"
var_ram="2048"
var_disk="4"
var_os="debian"
var_version="12"
var_unprivileged="1"
# App Output & Base Settings
header_info "$APP"
base_settings
# Core
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /opt/checkmk_version.txt ]]; then
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) }' | grep -v "*-rc" | tail -n +2 | head -n 1)
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
omd cp monitoring monitoringbackup &>/dev/null
wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb
apt-get install -y /opt/checkmk.deb &>/dev/null
omd --force -V ${RELEASE}.cre update --conflict=install &>/dev/null
omd start monitoring &>/dev/null
omd rm monitoringbackup &>/dev/null
omd cleanup &>/dev/null
rm -rf /opt/checkmk.deb
msg_ok "Updated ${APP} to v${RELEASE}"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}."
fi
exit
}
start
build_container
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}/monitoring${CL}"

View File

@ -43,7 +43,6 @@ msg_ok "Installed Dependencies"
msg_info "Setup Apache Tomcat" msg_info "Setup Apache Tomcat"
RELEASE=$(wget -qO- https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//') RELEASE=$(wget -qO- https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//')
mkdir -p /opt/apache-guacamole/tomcat9 mkdir -p /opt/apache-guacamole/tomcat9
mkdir -p /opt/apache-guacamole/server
wget -qO- "https://dlcdn.apache.org/tomcat/tomcat-9/v${RELEASE}/bin/apache-tomcat-${RELEASE}.tar.gz" | tar -xz -C /opt/apache-guacamole/tomcat9 --strip-components=1 wget -qO- "https://dlcdn.apache.org/tomcat/tomcat-9/v${RELEASE}/bin/apache-tomcat-${RELEASE}.tar.gz" | tar -xz -C /opt/apache-guacamole/tomcat9 --strip-components=1
useradd -r -d /opt/apache-guacamole/tomcat9 -s /bin/false tomcat useradd -r -d /opt/apache-guacamole/tomcat9 -s /bin/false tomcat
chown -R tomcat: /opt/apache-guacamole/tomcat9 chown -R tomcat: /opt/apache-guacamole/tomcat9
@ -54,8 +53,8 @@ msg_ok "Setup Apache Tomcat"
msg_info "Setup Apache Guacamole" msg_info "Setup Apache Guacamole"
mkdir -p /etc/guacamole/{extensions,lib} mkdir -p /etc/guacamole/{extensions,lib}
RELEASE_SERVER=$(curl -sL https://api.github.com/repos/apache/guacamole-server/tags | jq -r '.[0].name') RELEASE_SERVER=$(curl -sL https://api.github.com/repos/apache/guacamole-server/tags | jq -r '.[0].name')
wget -qO- https://api.github.com/repos/apache/guacamole-server/tarball/refs/tags/${RELEASE_SERVER} | tar -xz --strip-components=1 -C /opt/apache-guacamole/server wget -qO- https://api.github.com/repos/apache/guacamole-server/tarball/refs/tags/${RELEASE_SERVER} | tar -xz -C /opt/apache-guacamole --transform "s/.*\//apache-guacamole-server-${RELEASE_SERVER}/"
cd /opt/apache-guacamole/server cd /opt/apache-guacamole/apache-guacamole-server-${RELEASE_SERVER}
$STD autoreconf -fi $STD autoreconf -fi
$STD ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots $STD ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
$STD make $STD make

View File

@ -1,48 +0,0 @@
#!/usr/bin/env bash
#Copyright (c) 2021-2024 community-scripts ORG
# Author: Michel Roegl-Brunner (michelroegl-brunner)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
mc
msg_ok "Installed Dependencies"
msg_info "Install Checkmk"
#RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | grep -v "*-rc" | tail -n +2 | head -n 1)
RELEASE="2.3.0p12"
wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb
$STD apt-get install -y /opt/checkmk.deb
echo "${RELEASE}" >"/opt/checkmk_version.txt"
msg_ok "Installed Checkmk"
msg_info "Creating Service"
PASSWORD=$(omd create monitoring | grep "password:" | awk '{print $NF}')
$STD omd start &>/dev/null
{
echo "Application-Credentials"
echo "Username: cmkadmin"
echo "Password: $PASSWORD"
} >> ~/checkmk.creds
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/checkmk.deb
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@ -1,34 +0,0 @@
{
"name": "Checkmk",
"slug": "checkmk",
"categories": [
7
],
"date_created": "2024-12-19",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://docs.checkmk.com/",
"website": "https://checkmk.com/",
"logo": "https://github.com/Checkmk/checkmk/blob/master/omd/license_sources/checkmk_logo.svg",
"description": "Checkmk - Your complete IT monitoring solution",
"install_methods": [
{
"type": "default",
"script": "ct/checkmk.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 4,
"os": null,
"version": null
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}