From be8390a2cae9bb4e6fc0e898048ad6826cda7f76 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Fri, 10 Oct 2025 20:33:51 +0200 Subject: [PATCH] Remove rwMarkable and GLPI scripts --- ct/glpi.sh | 47 ----------- ct/rwmarkable.sh | 76 ----------------- install/glpi-install.sh | 152 ---------------------------------- install/rwmarkable-install.sh | 66 --------------- 4 files changed, 341 deletions(-) delete mode 100644 ct/glpi.sh delete mode 100644 ct/rwmarkable.sh delete mode 100644 install/glpi-install.sh delete mode 100644 install/rwmarkable-install.sh diff --git a/ct/glpi.sh b/ct/glpi.sh deleted file mode 100644 index d03b80be8..000000000 --- a/ct/glpi.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: NĂ­colas Pastorello (opastorello) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.glpi-project.org/ - -APP="GLPI" -var_tags="${var_tags:-asset-management;foss}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-10}" -var_os="${var_os:-debian}" -var_version="${var_version:-12}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/glpi ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_error "Currently we don't provide an update function for this ${APP}." - 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}:80${CL}" \ No newline at end of file diff --git a/ct/rwmarkable.sh b/ct/rwmarkable.sh deleted file mode 100644 index c98d3d887..000000000 --- a/ct/rwmarkable.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/fccview/rwMarkable - -APP="rwMarkable" -var_tags="${var_tags:-tasks;notes}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-6}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/rwmarkable ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "rwMarkable" "fccview/rwMarkable"; then - msg_info "Stopping ${APP}" - systemctl stop rwmarkable - msg_ok "Stopped ${APP}" - - msg_info "Backing up configuration & data" - cd /opt/rwmarkable - cp ./.env /opt/app.env - $STD tar -cf /opt/data_config.tar ./data ./config - msg_ok "Backed up configuration & data" - - NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs - cd /opt - export CLEAN_INSTALL=1 - fetch_and_deploy_gh_release "rwMarkable" "fccview/rwMarkable" "tarball" "latest" "/opt/rwmarkable" - - msg_info "Updating app" - cd /opt/rwmarkable - $STD yarn --frozen-lockfile - $STD yarn next telemetry disable - $STD yarn build - msg_ok "Updated app" - - msg_info "Restoring configuration & data" - mv /opt/app.env /opt/rwmarkable/.env - $STD tar -xf /opt/data_config.tar - msg_ok "Restored configuration & data" - - msg_info "Restarting ${APP} service" - systemctl start rwmarkable - msg_ok "Restarted ${APP} service" - rm /opt/data_config.tar - msg_ok "Updated Successfully" - 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}:3000${CL}" diff --git a/install/glpi-install.sh b/install/glpi-install.sh deleted file mode 100644 index 64610fb2f..000000000 --- a/install/glpi-install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: NĂ­colas Pastorello (opastorello) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.glpi-project.org/ - -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 \ - git \ - apache2 \ - php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \ - php-cas \ - libapache2-mod-php -msg_ok "Installed Dependencies" - -setup_mariadb - -msg_info "Setting up database" -DB_NAME=glpi_db -DB_USER=glpi -DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql -$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" -$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" -$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';" -$STD mariadb -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "GLPI Database Credentials" - echo "Database: $DB_NAME" - echo "Username: $DB_USER" - echo "Password: $DB_PASS" -} >>~/glpi_db.creds -msg_ok "Set up database" - -msg_info "Installing GLPi" -cd /opt -RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') -curl -fsSL "https://github.com/glpi-project/glpi/releases/download/10.0.20/glpi-10.0.20.tgz" -o "glpi-10.0.20.tgz" -$STD tar -xzvf glpi-10.0.20.tgz -cd /opt/glpi -$STD php bin/console db:install --db-name=$DB_NAME --db-user=$DB_USER --db-password=$DB_PASS --no-interaction --allow-superuser -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Installed GLPi" - -msg_info "Setting Downstream file" -cat </opt/glpi/inc/downstream.php -/etc/glpi/local_define.php -/etc/apache2/sites-available/glpi.conf - - ServerName localhost - DocumentRoot /opt/glpi/public - - - Require all granted - RewriteEngine On - RewriteCond %{HTTP:Authorization} ^(.+)$ - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php [QSA,L] - - - ErrorLog \${APACHE_LOG_DIR}/glpi_error.log - CustomLog \${APACHE_LOG_DIR}/glpi_access.log combined - -EOF -$STD a2dissite 000-default.conf -$STD a2enmod rewrite -$STD a2ensite glpi.conf -msg_ok "Setup Service" - -msg_info "Setup Cronjob" -echo "* * * * * php /opt/glpi/front/cron.php" | crontab - -msg_ok "Setup Cronjob" - -msg_info "Update PHP Params" -PHP_VERSION=$(ls /etc/php/ | grep -E '^[0-9]+\.[0-9]+$' | head -n 1) -PHP_INI="/etc/php/$PHP_VERSION/apache2/php.ini" -sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 20M/' $PHP_INI -sed -i 's/^post_max_size = .*/post_max_size = 20M/' $PHP_INI -sed -i 's/^max_execution_time = .*/max_execution_time = 60/' $PHP_INI -sed -i 's/^max_input_vars = .*/max_input_vars = 5000/' $PHP_INI -sed -i 's/^memory_limit = .*/memory_limit = 256M/' $PHP_INI -sed -i 's/^;\?\s*session.cookie_httponly\s*=.*/session.cookie_httponly = On/' $PHP_INI -systemctl restart apache2 -msg_ok "Update PHP Params" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -rf /opt/glpi/install -rm -rf /opt/glpi-${RELEASE}.tgz -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" diff --git a/install/rwmarkable-install.sh b/install/rwmarkable-install.sh deleted file mode 100644 index afba71011..000000000 --- a/install/rwmarkable-install.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: vhsdream -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/fccview/rwMarkable - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs -fetch_and_deploy_gh_release "rwMarkable" "fccview/rwMarkable" "tarball" "latest" "/opt/rwmarkable" - -msg_info "Installing ${APPLICATION}" -cd /opt/rwmarkable -$STD yarn --frozen-lockfile -$STD yarn next telemetry disable -$STD yarn build -mkdir -p data/{users,checklists,notes} - -cat </opt/rwmarkable/.env -NODE_ENV=production -# HTTPS=true - -# --- SSO with OIDC (optional) -# SSO_MODE=oidc -# OIDC_ISSUER= -# OIDC_CLIENT_ID= -# APP_URL= -# SSO_FALLBACK_LOCAL=true # Allow both SSO and normal login -# OIDC_CLIENT_SECRET=your_client_secret # Enable confidential client mode with client authentication -# OIDC_ADMIN_GROUPS=admins # Map provider groups to admin role -EOF -msg_ok "Installed ${APPLICATION}" - -msg_info "Creating Service" -cat </etc/systemd/system/rwmarkable.service -[Unit] -Description=rwMarkable server -After=network.target - -[Service] -WorkingDirectory=/opt/rwmarkable -EnvironmentFile=/opt/rwmarkable/.env -ExecStart=yarn start -Restart=on-abnormal - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now rwmarkable -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt -y autoremove -$STD apt -y autoclean -$STD apt -y clean -msg_ok "Cleaned"