Compare commits

..
Author SHA1 Message Date
MickLesk 79f3dc9a6d Exit 64 when a required setting is missing
newt, forgejo-runner, spacebot and alpine-borgbackup-server stopped with
1 when an unattended install lacked a value it needs, which reports as a
general error; 64 is the code for a missing or invalid input, as
twingate-connector and nextdns already use.
2026-11-28 15:13:04 +01:00
community-scripts-pr-app[bot]andgithub-actions[bot] a7216552a4 Update CHANGELOG.md (#19151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-28 14:00:40 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 95c8b405cd Update CHANGELOG.md (#19150)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-28 14:00:05 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 45c058574f Update CHANGELOG.md (#19149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-28 13:22:43 +00:00
push-app-to-main[bot] 5712738915 Add dokuwiki (ct) (#19138)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
2026-11-28 14:22:12 +01:00
10 changed files with 210 additions and 124 deletions

No files matched your search

+8 -1
View File
@@ -589,6 +589,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-11-28
### 🆕 New Scripts
- DokuWiki [@MickLesk](https://github.com/MickLesk) ([#19138](https://github.com/community-scripts/ProxmoxVE/pull/19138))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
@@ -597,7 +601,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 💾 Core
- PHP: Keep Sury from pulling a second PHP in, and read the version from packages [@MickLesk](https://github.com/MickLesk) ([core#316](https://github.com/community-scripts/core/pull/316))
- Leave a legacy version file to the app it belongs to [@MickLesk](https://github.com/MickLesk) ([core#317](https://github.com/community-scripts/core/pull/317))
- incus: draw the banner when the header cache belongs to another user [@MickLesk](https://github.com/MickLesk) ([core#318](https://github.com/community-scripts/core/pull/318))
- Incus: Report Incus VM runs to telemetry [@MickLesk](https://github.com/MickLesk) ([core#319](https://github.com/community-scripts/core/pull/319))
- PHP: Keep Sury from pulling a second PHP in, and read the version from packages [@MickLesk](https://github.com/MickLesk) ([core#316](https://github.com/community-scripts/core/pull/316))
- Give PVE containers from linuxcontainers.org images the Proxmox templates Base set [@MickLesk](https://github.com/MickLesk) ([core#315](https://github.com/community-scripts/core/pull/315))
- PHP: keep modules, pools and settings when setup_php changes the PHP version [@MickLesk](https://github.com/MickLesk) ([core#314](https://github.com/community-scripts/core/pull/314))
+2 -2
View File
@@ -54,12 +54,12 @@ function update_script() {
if [[ -z "$SSH_PUBLIC_KEY" ]]; then
msg_error "No SSH public key provided!"
exit 1
exit 64
fi
if [[ ! "$SSH_PUBLIC_KEY" =~ ^(ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-) ]]; then
msg_error "Invalid SSH public key format!"
exit 1
exit 64
fi
msg_info "Setting up SSH access"
-49
View File
@@ -1,49 +0,0 @@
#!/usr/bin/env bash
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Tom Frenzel (tomfrenzel)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/chirpstack/chirpstack
APP="ChirpStack"
var_tags="${var_tags:-lorawan;iot}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/chirpstack/chirpstack.toml ]]; then
msg_error "No ChirpStack Installation Found!"
exit
fi
msg_info "Updating ChirpStack"
$STD apt update
upgrade_packages_with_retry "chirpstack" "chirpstack-gateway-bridge"
msg_ok "Updated ChirpStack"
msg_ok "Updated successfully!"
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 "${GATEWAY}${BGN}http://${IP}:8080${CL}"
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/env bash
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/dokuwiki/dokuwiki
APP="DokuWiki"
var_tags="${var_tags:-wiki;documentation}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
export var_admin_user="${var_admin_user:-}"
export var_admin_pass="${var_admin_pass:-}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/dokuwiki ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "dokuwiki" "dokuwiki/dokuwiki"; then
msg_info "Stopping DokuWiki"
systemctl stop nginx php8.4-fpm
msg_ok "Stopped DokuWiki"
fetch_and_deploy_gh_release "dokuwiki" "dokuwiki/dokuwiki" "prebuild" "latest" "/opt/dokuwiki" "dokuwiki-*.tgz"
msg_info "Removing obsolete DokuWiki files"
grep -E '^[[:alnum:]_][^[:space:]]*$' /opt/dokuwiki/data/deleted.files | grep -Fv '..' | sed 's|^|/opt/dokuwiki/|' | xargs -r -d '\n' rm -rf --
rm -f /opt/dokuwiki/install.php /opt/dokuwiki/data/cache/messages.txt
chown -R www-data:www-data /opt/dokuwiki
msg_ok "Removed obsolete DokuWiki files"
msg_info "Starting DokuWiki"
systemctl start php8.4-fpm nginx
msg_ok "Started DokuWiki"
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 "${GATEWAY}${BGN}http://${IP}${CL}"
echo -e "${INFO}${YW}Admin login: /opt/dokuwiki_data/.env (inside the container)${CL}"
+3 -3
View File
@@ -64,15 +64,15 @@ function update_script() {
if [[ -n "${mode:-}" ]]; then
if [[ -z "${var_forgejo_instance:-}" ]]; then
msg_error "var_forgejo_instance is required for unattended installs."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
msg_error "var_forgejo_runner_uuid is required for unattended installs."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
msg_error "var_forgejo_runner_token is required for unattended installs."
exit 1
exit 64
fi
fi
+1 -1
View File
@@ -22,7 +22,7 @@ export var_llm_model="${var_llm_model:-}"
if [[ -n "$var_llm_base_url" && -z "$var_llm_model" ]]; then
msg_error "var_llm_model is required with var_llm_base_url."
exit 1
exit 64
fi
header_info "$APP"
-65
View File
@@ -1,65 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Tom Frenzel (tomfrenzel)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/chirpstack/chirpstack
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
if [[ -z "${var_region:-}" ]]; then
echo -e "${INFO}${YW}Available regions: https://github.com/chirpstack/chirpstack/tree/master/chirpstack/configuration${CL}"
read -r -p "${TAB3}Gateway region ID (e.g. eu868, us915_0): " var_region || true
fi
if [[ -z "${var_region:-}" ]]; then
msg_error "Gateway region ID is required (set var_region or enter it when prompted)"
exit 1
fi
msg_info "Installing Dependencies"
$STD apt install -y \
mosquitto \
redis-server
msg_ok "Installed Dependencies"
PG_VERSION="18" setup_postgresql
PG_DB_NAME="chirpstack" PG_DB_USER="chirpstack" PG_DB_EXTENSIONS="pg_trgm" setup_postgresql_db
msg_info "Installing ChirpStack"
setup_deb822_repo \
"chirpstack" \
"https://artifacts.chirpstack.io/packages/chirpstack.key" \
"https://artifacts.chirpstack.io/packages/4.x/deb" \
"stable" \
"main"
$STD apt install -y \
chirpstack-gateway-bridge \
chirpstack
msg_ok "Installed ChirpStack"
msg_info "Configuring ChirpStack"
sed -i "s|^\(\s*dsn = \).*|\1\"postgres://chirpstack:${PG_DB_PASS}@localhost/chirpstack?sslmode=disable\"|" /etc/chirpstack/chirpstack.toml
if ! grep -Eq "^[[:space:]]*\"${var_region,,}\"[[:space:]]*,?[[:space:]]*$" /etc/chirpstack/chirpstack.toml; then
sed -i "/^[[:space:]]*enabled_regions = \\[$/a\\ \"${var_region,,}\"," /etc/chirpstack/chirpstack.toml
fi
sed -i -E "s#^(\s*(event|command)_topic_template\s*=\s*\")#\1${var_region,,}/#" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
mkdir -p /etc/systemd/system/chirpstack.service.d
cat <<EOF >/etc/systemd/system/chirpstack.service.d/override.conf
[Unit]
After=postgresql.service redis-server.service mosquitto.service
EOF
systemctl daemon-reload
# the packaged unit starts on the stock DSN, crash-loops and hits its start limit
systemctl reset-failed chirpstack
systemctl restart chirpstack chirpstack-gateway-bridge
msg_ok "Configured ChirpStack"
motd_ssh
customize
cleanup_lxc
+127
View File
@@ -0,0 +1,127 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/dokuwiki/dokuwiki
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
var_admin_user="${var_admin_user:-admin}"
var_admin_user="${var_admin_user,,}"
if [[ ! "$var_admin_user" =~ ^[a-z0-9._-]+$ ]]; then
msg_warn "Invalid admin username '${var_admin_user}', using admin"
var_admin_user="admin"
fi
var_admin_pass="${var_admin_pass:-$(random_password 16)}"
msg_info "Installing Dependencies"
$STD apt install -y nginx
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
fetch_and_deploy_gh_release "dokuwiki" "dokuwiki/dokuwiki" "prebuild" "latest" "/opt/dokuwiki" "dokuwiki-*.tgz"
msg_info "Configuring DokuWiki"
mkdir -p /opt/dokuwiki_data
cat <<EOF >/opt/dokuwiki_data/.env
DOKUWIKI_ADMIN_USER=${var_admin_user}
DOKUWIKI_ADMIN_PASS=${var_admin_pass}
EOF
chmod 600 /opt/dokuwiki_data/.env
cat <<'EOF' >/opt/dokuwiki/conf/local.php
<?php
$conf['title'] = 'DokuWiki';
$conf['lang'] = 'en';
$conf['license'] = 'cc-by-sa';
$conf['useacl'] = 1;
$conf['superuser'] = '@admin';
$conf['disableactions'] = 'register';
$conf['userewrite'] = 1;
EOF
ADMIN_HASH=$(php -r 'echo password_hash($argv[1], PASSWORD_BCRYPT);' "$var_admin_pass")
cat <<EOF >/opt/dokuwiki/conf/users.auth.php
# users.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# login:passwordhash:Real Name:email:groups,comma,separated
${var_admin_user}:${ADMIN_HASH}:Administrator:admin@localhost:admin,user
EOF
cat <<'EOF' >/opt/dokuwiki/conf/acl.auth.php
# acl.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# none 0, read 1, edit 2, create 4, upload 8, delete 16
* @ALL 1
* @user 8
EOF
cat <<'EOF' >/opt/dokuwiki/conf/plugins.local.php
<?php
$plugins['authad'] = 0;
$plugins['authldap'] = 0;
EOF
rm -f /opt/dokuwiki/install.php
chown -R www-data:www-data /opt/dokuwiki
msg_ok "Configured DokuWiki"
msg_info "Configuring Nginx"
PHP_SOCK=$(get_php_fpm_socket)
cat <<EOF >/etc/nginx/sites-available/dokuwiki
server {
listen 80;
listen [::]:80;
server_name _;
root /opt/dokuwiki;
index doku.php;
client_max_body_size 128M;
server_tokens off;
fastcgi_hide_header X-Powered-By;
location ~ ^/(conf|bin|inc|vendor)/ {
deny all;
}
location ~ ^/data/ {
internal;
}
location ~ /\.|^/(install\.php|README|VERSION|COPYING|SECURITY\.md)\$ {
deny all;
}
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg|svg)\$ {
expires 365d;
}
location / {
try_files \$uri \$uri/ @dokuwiki;
}
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=\$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=\$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_\$1&id=\$2 last;
rewrite ^/(.*) /doku.php?id=\$1&\$args last;
}
location ~ \.php\$ {
try_files \$uri \$uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:${PHP_SOCK};
}
}
EOF
nginx_enable_site "dokuwiki"
msg_ok "Configured Nginx"
motd_ssh
customize
cleanup_lxc
+2 -2
View File
@@ -25,7 +25,7 @@ fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
msg_error "No runner UUID provided. Cannot continue."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
@@ -34,7 +34,7 @@ fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
msg_error "No runner registration token provided. Cannot continue."
exit 1
exit 64
fi
DEFAULT_RUNNER_LABELS="linux-amd64:docker://node:22-bookworm"
+1 -1
View File
@@ -28,7 +28,7 @@ PANGOLIN_ENDPOINT="${PANGOLIN_ENDPOINT:-${var_newt_endpoint:-}}"
if [[ -z "$NEWT_ID" || -z "$NEWT_SECRET" || -z "$PANGOLIN_ENDPOINT" ]]; then
msg_error "Newt ID, Secret and Endpoint are all required. Aborting."
exit 1
exit 64
fi
msg_info "Configuring Newt"