From 445bf2096285667a6a6097ef4e9bcd26fe7f519e Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 13:47:39 -0500 Subject: [PATCH 01/13] Added Otter Wiki entry --- ct/OtterWiki.sh | 93 +++++++++++++++++++++++++++++ frontend/public/json/OtterWiki.json | 40 +++++++++++++ install/OtterWiki-Install.sh | 88 +++++++++++++++++++++++++++ misc/build.func | 2 +- misc/install.func | 2 +- 5 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 ct/OtterWiki.sh create mode 100644 frontend/public/json/OtterWiki.json create mode 100644 install/OtterWiki-Install.sh diff --git a/ct/OtterWiki.sh b/ct/OtterWiki.sh new file mode 100644 index 000000000..d46a685d1 --- /dev/null +++ b/ct/OtterWiki.sh @@ -0,0 +1,93 @@ +#!/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: CillyCil +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/redimp/otterwiki + +# App Default Values +# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole" +APP="OtterWiki" +# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp) +var_tags="${var_tags:-wiki}" +# Number of cores (1-X) (e.g. 4) - default are 2 +var_cpu="${var_cpu:-2}" +# Amount of used RAM in MB (e.g. 2048 or 4096) +var_ram="${var_ram:-2048}" +# Amount of used disk space in GB (e.g. 4 or 10) +var_disk="${var_disk:-10}" +# Default OS (e.g. debian, ubuntu, alpine) +var_os="${var_os:-debian}" +# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine) +var_version="${var_version:-12}" +# 1 = unprivileged container, 0 = privileged container +var_unprivileged="${var_unprivileged:-0}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f /opt/OtterWiki ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + # Crawling the new version and checking whether an update is required + RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + # Stopping Services + msg_info "Stopping $APP" + systemctl stop OtterWiki.service + msg_ok "Stopped $APP" + + # Creating Backup + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/OtterWiki/app-data /opt/OtterWiki/settings.cfg + msg_ok "Backup Created" + + # Execute Update + msg_info "Updating $APP to v${RELEASE}" + cd /opt/OtterWiki/ + # Update the repository information + git remote update origin + # Get the latest release tag + LATEST_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1)) + # Create a new branch named like the latest release version. + git checkout -b $LATEST_RELEASE $LATEST_RELEASE + ./venv/bin/pip install -U . + msg_ok "Updated $APP to v${RELEASE}" + + # Starting Services + msg_info "Starting $APP" + systemctl start OtterWiki.service + msg_ok "Started $APP" + + # # Cleaning up + # msg_info "Cleaning Up" + # rm -rf [TEMP_FILES] + # msg_ok "Cleanup Completed" + + # Last Action + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + 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}:8080${CL}" \ No newline at end of file diff --git a/frontend/public/json/OtterWiki.json b/frontend/public/json/OtterWiki.json new file mode 100644 index 000000000..209cf932a --- /dev/null +++ b/frontend/public/json/OtterWiki.json @@ -0,0 +1,40 @@ +{ + "name": "OtterWiki", + "slug": "otterwiki", + "categories": [ + 12 + ], + "date_created": "2025-08-17", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://otterwiki.com/", + "config_path": "/opt/OtterWiki/settings.cfg", + "website": "https://github.com/redimp/otterwiki", + "logo": "https://otterwiki.com/static/img/otterhead.png", + "description": "A minimalistic wiki powered by python, markdown and git.", + "install_methods": [ + { + "type": "default", + "script": "ct/otterwiki.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "The first account registered will be an admin account with access to the application settings.", + "type": "info" + } + ] + } \ No newline at end of file diff --git a/install/OtterWiki-Install.sh b/install/OtterWiki-Install.sh new file mode 100644 index 000000000..18301577c --- /dev/null +++ b/install/OtterWiki-Install.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CillyCil +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/redimp/otterwiki + +# Import Functions und Setup +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installing Dependencies +msg_info "Installing Dependencies" +$STD apt-get install -y \ + git \ + build-essential \ + python3-dev \ + python3-venv \ +msg_ok "Installed Dependencies" + +# # Template: MySQL Database +# msg_info "Setting up Database" +# DB_NAME=[DB_NAME] +# DB_USER=[DB_USER] +# DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +# $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +# $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +# $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +# { +# echo "${APPLICATION} Credentials" +# echo "Database User: $DB_USER" +# echo "Database Password: $DB_PASS" +# echo "Database Name: $DB_NAME" +# } >>~/"$APP_NAME".creds +# msg_ok "Set up Database" + +# Setup App +msg_info "Setup ${APPLICATION}" +RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSL -o "${RELEASE}.zip" "https://github.com/redimp/otterwiki/archive/refs/tags/${RELEASE}.zip" +unzip -q "${RELEASE}.zip" +mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}" +mkdir -p app-data/repository +# initialize the empty repository +git init -b main app-data/repository +echo "REPOSITORY='${PWD}/app-data/repository'" >> settings.cfg +echo "SQLALCHEMY_DATABASE_URI='sqlite:///${PWD}/app-data/db.sqlite'" >> settings.cfg +echo "SECRET_KEY='$(python -c 'import secrets; print(secrets.token_hex())')'" >> settings.cfg +python3 -m venv venv +./venv/bin/pip install -U pip uwsgi +./venv/bin/pip install . +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +msg_ok "Setup ${APPLICATION}" + +# Creating Service (if needed) +msg_info "Creating Service" +cat </etc/systemd/system/"${APPLICATION}".service +[Unit] +Description=uWSGI server for An Otter Wiki + +[Service] +User=www-data +Group=www-data +Environment=OTTERWIKI_SETTINGS=/opt/OtterWiki/settings.cfg +ExecStart=/opt/OtterWiki/venv/bin/uwsgi --http 127.0.0.1:8080 --enable-threads --die-on-term -w otterwiki.server:app +SyslogIdentifier=otterwiki + +[Install] +WantedBy=multi-user.target +EOF +systemctl daemon-reload +systemctl enable -q --now "${APPLICATION}" +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f "${RELEASE}".zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/misc/build.func b/misc/build.func index c40a57bd1..328060289 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1129,7 +1129,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/branch/main/misc/install.func)" fi export DIAGNOSTICS="$DIAGNOSTICS" export RANDOM_UUID="$RANDOM_UUID" diff --git a/misc/install.func b/misc/install.func index e3751c295..418ca8936 100644 --- a/misc/install.func +++ b/misc/install.func @@ -196,7 +196,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then mkdir -p /root/.ssh From 8386d9f5c53037573b99f95075e15d4d6b45fe6d Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:14:51 -0500 Subject: [PATCH 02/13] Fix paths in Otter Wiki --- ct/OtterWiki.sh | 12 ++++----- frontend/public/json/OtterWiki.json | 38 ++++++++++++++--------------- install/OtterWiki-Install.sh | 8 +++--- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ct/OtterWiki.sh b/ct/OtterWiki.sh index d46a685d1..3d9ac38f5 100644 --- a/ct/OtterWiki.sh +++ b/ct/OtterWiki.sh @@ -34,7 +34,7 @@ function update_script() { check_container_resources # Check if installation is present | -f for file, -d for folder - if [[ ! -f /opt/OtterWiki ]]; then + if [[ ! -f /opt/otterwiki ]]; then msg_error "No ${APP} Installation Found!" exit fi @@ -44,17 +44,17 @@ function update_script() { if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then # Stopping Services msg_info "Stopping $APP" - systemctl stop OtterWiki.service + systemctl stop otterwiki.service msg_ok "Stopped $APP" # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/OtterWiki/app-data /opt/OtterWiki/settings.cfg + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/otterwiki/app-data /opt/otterwiki/settings.cfg msg_ok "Backup Created" # Execute Update msg_info "Updating $APP to v${RELEASE}" - cd /opt/OtterWiki/ + cd /opt/otterwiki/ || exit # Update the repository information git remote update origin # Get the latest release tag @@ -66,7 +66,7 @@ function update_script() { # Starting Services msg_info "Starting $APP" - systemctl start OtterWiki.service + systemctl start otterwiki.service msg_ok "Started $APP" # # Cleaning up @@ -90,4 +90,4 @@ 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}:8080${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/frontend/public/json/OtterWiki.json b/frontend/public/json/OtterWiki.json index 209cf932a..959415a75 100644 --- a/frontend/public/json/OtterWiki.json +++ b/frontend/public/json/OtterWiki.json @@ -2,7 +2,7 @@ "name": "OtterWiki", "slug": "otterwiki", "categories": [ - 12 + 12 ], "date_created": "2025-08-17", "type": "ct", @@ -10,31 +10,31 @@ "privileged": false, "interface_port": 8080, "documentation": "https://otterwiki.com/", - "config_path": "/opt/OtterWiki/settings.cfg", + "config_path": "/opt/otterwiki/settings.cfg", "website": "https://github.com/redimp/otterwiki", "logo": "https://otterwiki.com/static/img/otterhead.png", "description": "A minimalistic wiki powered by python, markdown and git.", "install_methods": [ - { - "type": "default", - "script": "ct/otterwiki.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 10, - "os": "Debian", - "version": "12" + { + "type": "default", + "script": "ct/otterwiki.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "Debian", + "version": "12" + } } - } ], "default_credentials": { - "username": null, - "password": null + "username": null, + "password": null }, "notes": [ - { - "text": "The first account registered will be an admin account with access to the application settings.", - "type": "info" - } + { + "text": "The first account registered will be an admin account with access to the application settings.", + "type": "info" + } ] - } \ No newline at end of file +} diff --git a/install/OtterWiki-Install.sh b/install/OtterWiki-Install.sh index 18301577c..0261cf02c 100644 --- a/install/OtterWiki-Install.sh +++ b/install/OtterWiki-Install.sh @@ -45,6 +45,7 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/late curl -fsSL -o "${RELEASE}.zip" "https://github.com/redimp/otterwiki/archive/refs/tags/${RELEASE}.zip" unzip -q "${RELEASE}.zip" mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}" +cd /opt/${APPLICATION} || exit mkdir -p app-data/repository # initialize the empty repository git init -b main app-data/repository @@ -64,9 +65,8 @@ cat </etc/systemd/system/"${APPLICATION}".service Description=uWSGI server for An Otter Wiki [Service] -User=www-data -Group=www-data -Environment=OTTERWIKI_SETTINGS=/opt/OtterWiki/settings.cfg +User=root +Environment=OTTERWIKI_SETTINGS=/opt/otterwiki/settings.cfg ExecStart=/opt/OtterWiki/venv/bin/uwsgi --http 127.0.0.1:8080 --enable-threads --die-on-term -w otterwiki.server:app SyslogIdentifier=otterwiki @@ -85,4 +85,4 @@ msg_info "Cleaning up" rm -f "${RELEASE}".zip $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From fae848dba977d3f741782265bc3ea9892d76be26 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:19:21 -0500 Subject: [PATCH 03/13] Rename OtterWiki.sh to otterwiki.sh --- ct/{OtterWiki.sh => otterwiki.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ct/{OtterWiki.sh => otterwiki.sh} (100%) diff --git a/ct/OtterWiki.sh b/ct/otterwiki.sh similarity index 100% rename from ct/OtterWiki.sh rename to ct/otterwiki.sh From e5920e4af6eb4a619b11540e163d45d923d08a99 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:19:42 -0500 Subject: [PATCH 04/13] Rename OtterWiki-Install.sh to otterwiki-install.sh --- install/{OtterWiki-Install.sh => otterwiki-install.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename install/{OtterWiki-Install.sh => otterwiki-install.sh} (100%) diff --git a/install/OtterWiki-Install.sh b/install/otterwiki-install.sh similarity index 100% rename from install/OtterWiki-Install.sh rename to install/otterwiki-install.sh From a4c5722c3661c3cbc626918e5a715a81d58993aa Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:20:24 -0500 Subject: [PATCH 05/13] Update and rename OtterWiki.json to otterwiki.json --- frontend/public/json/{OtterWiki.json => otterwiki.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/public/json/{OtterWiki.json => otterwiki.json} (100%) diff --git a/frontend/public/json/OtterWiki.json b/frontend/public/json/otterwiki.json similarity index 100% rename from frontend/public/json/OtterWiki.json rename to frontend/public/json/otterwiki.json From ef4f89873fcd2a964a9fc0f47e242676a319e3de Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:33:24 -0500 Subject: [PATCH 06/13] Fixed paths again --- ct/OtterWiki.sh | 2 +- misc/build.func | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/OtterWiki.sh b/ct/OtterWiki.sh index 3d9ac38f5..0a6ee8558 100644 --- a/ct/OtterWiki.sh +++ b/ct/OtterWiki.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/CillyCil/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: CillyCil # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index 328060289..81e085624 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1438,7 +1438,7 @@ EOF' fi msg_ok "Customized LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/CillyCil/ProxmoxVED/main/install/${var_install}.sh)" } destroy_lxc() { From 1df09aa420fcd24539f72c9d02f8ebfe318c5c29 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 14:57:42 -0500 Subject: [PATCH 07/13] Fixing more paths --- ct/otterwiki.sh | 4 ++-- install/otterwiki-install.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/otterwiki.sh b/ct/otterwiki.sh index 0a6ee8558..182d8ff10 100644 --- a/ct/otterwiki.sh +++ b/ct/otterwiki.sh @@ -41,7 +41,7 @@ function update_script() { # Crawling the new version and checking whether an update is required RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + if [[ "${RELEASE}" != "$(cat /opt/otterwiki_version.txt)" ]] || [[ ! -f /opt/otterwiki_version.txt ]]; then # Stopping Services msg_info "Stopping $APP" systemctl stop otterwiki.service @@ -75,7 +75,7 @@ function update_script() { # msg_ok "Cleanup Completed" # Last Action - echo "${RELEASE}" >/opt/${APP}_version.txt + echo "${RELEASE}" >/opt/otterwiki_version.txt msg_ok "Update Successful" else msg_ok "No update required. ${APP} is already at v${RELEASE}" diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index 0261cf02c..9143d6cc3 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -44,8 +44,8 @@ msg_info "Setup ${APPLICATION}" RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL -o "${RELEASE}.zip" "https://github.com/redimp/otterwiki/archive/refs/tags/${RELEASE}.zip" unzip -q "${RELEASE}.zip" -mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}" -cd /opt/${APPLICATION} || exit +mv "otterwiki-${RELEASE}/" "/opt/otterwiki" +cd /opt/otterwiki || exit mkdir -p app-data/repository # initialize the empty repository git init -b main app-data/repository @@ -55,12 +55,12 @@ echo "SECRET_KEY='$(python -c 'import secrets; print(secrets.token_hex())')'" >> python3 -m venv venv ./venv/bin/pip install -U pip uwsgi ./venv/bin/pip install . -echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +echo "${RELEASE}" >/opt/otterwiki_version.txt msg_ok "Setup ${APPLICATION}" # Creating Service (if needed) msg_info "Creating Service" -cat </etc/systemd/system/"${APPLICATION}".service +cat </etc/systemd/system/otterwiki.service [Unit] Description=uWSGI server for An Otter Wiki @@ -74,7 +74,7 @@ SyslogIdentifier=otterwiki WantedBy=multi-user.target EOF systemctl daemon-reload -systemctl enable -q --now "${APPLICATION}" +systemctl enable -q --now otterwiki msg_ok "Created Service" motd_ssh From 709ee33621c9168547549536180494177163abdd Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 15:09:18 -0500 Subject: [PATCH 08/13] Fix install.func url --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 81e085624..3553dd2e2 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1129,7 +1129,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/branch/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/main/misc/install.func)" fi export DIAGNOSTICS="$DIAGNOSTICS" export RANDOM_UUID="$RANDOM_UUID" From bc43d9e7b05246891f37c5b4d6750dc803357299 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 15:19:29 -0500 Subject: [PATCH 09/13] Fix installing dependencies --- install/otterwiki-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index 9143d6cc3..2277f1966 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y \ git \ build-essential \ python3-dev \ - python3-venv \ + python3-venv msg_ok "Installed Dependencies" # # Template: MySQL Database From 3075c3720ffd5f99465abc4c7dda7a80a0e96092 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 15:37:47 -0500 Subject: [PATCH 10/13] Fix unzip --- install/otterwiki-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index 2277f1966..4ebe9bdd1 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -44,7 +44,7 @@ msg_info "Setup ${APPLICATION}" RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL -o "${RELEASE}.zip" "https://github.com/redimp/otterwiki/archive/refs/tags/${RELEASE}.zip" unzip -q "${RELEASE}.zip" -mv "otterwiki-${RELEASE}/" "/opt/otterwiki" +mv "otterwiki-${RELEASE:1}/" "/opt/otterwiki" cd /opt/otterwiki || exit mkdir -p app-data/repository # initialize the empty repository From a9844a63b736096b59ae138a1575e20463c9b973 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 15:52:03 -0500 Subject: [PATCH 11/13] Fix secret key generation --- install/otterwiki-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index 4ebe9bdd1..de74985c0 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -51,7 +51,7 @@ mkdir -p app-data/repository git init -b main app-data/repository echo "REPOSITORY='${PWD}/app-data/repository'" >> settings.cfg echo "SQLALCHEMY_DATABASE_URI='sqlite:///${PWD}/app-data/db.sqlite'" >> settings.cfg -echo "SECRET_KEY='$(python -c 'import secrets; print(secrets.token_hex())')'" >> settings.cfg +echo "SECRET_KEY='$(python3 -c 'import secrets; print(secrets.token_hex())')'" >> settings.cfg python3 -m venv venv ./venv/bin/pip install -U pip uwsgi ./venv/bin/pip install . From 20498c92b029977d14143b3d2f398ff0beb97397 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 16:44:24 -0500 Subject: [PATCH 12/13] Fix Otter Wiki startup --- install/otterwiki-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index de74985c0..4ed05cec9 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -67,7 +67,7 @@ Description=uWSGI server for An Otter Wiki [Service] User=root Environment=OTTERWIKI_SETTINGS=/opt/otterwiki/settings.cfg -ExecStart=/opt/OtterWiki/venv/bin/uwsgi --http 127.0.0.1:8080 --enable-threads --die-on-term -w otterwiki.server:app +ExecStart=/opt/otterwiki/venv/bin/uwsgi --http :8080 --enable-threads --die-on-term -w otterwiki.server:app SyslogIdentifier=otterwiki [Install] From 83137fb7489a2e6d3f57264f9c8bd6a147782204 Mon Sep 17 00:00:00 2001 From: Cil Date: Sun, 17 Aug 2025 16:54:47 -0500 Subject: [PATCH 13/13] Prepare for pull request --- ct/otterwiki.sh | 4 ++-- install/otterwiki-install.sh | 2 +- misc/build.func | 4 ++-- misc/install.func | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/otterwiki.sh b/ct/otterwiki.sh index 182d8ff10..20cbc4097 100644 --- a/ct/otterwiki.sh +++ b/ct/otterwiki.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/CillyCil/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: CillyCil -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/redimp/otterwiki # App Default Values diff --git a/install/otterwiki-install.sh b/install/otterwiki-install.sh index 4ed05cec9..12f4a7273 100644 --- a/install/otterwiki-install.sh +++ b/install/otterwiki-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: CillyCil -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/redimp/otterwiki # Import Functions und Setup diff --git a/misc/build.func b/misc/build.func index 3553dd2e2..c40a57bd1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1129,7 +1129,7 @@ build_container() { if [ "$var_os" == "alpine" ]; then export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" fi export DIAGNOSTICS="$DIAGNOSTICS" export RANDOM_UUID="$RANDOM_UUID" @@ -1438,7 +1438,7 @@ EOF' fi msg_ok "Customized LXC Container" - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/CillyCil/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" } destroy_lxc() { diff --git a/misc/install.func b/misc/install.func index 418ca8936..e3751c295 100644 --- a/misc/install.func +++ b/misc/install.func @@ -196,7 +196,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - echo "bash -c \"\$(curl -fsSL https://github.com/CillyCil/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then mkdir -p /root/.ssh