From aca900782e99b24120730fd012e4942cd39f192d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Tue, 31 Dec 2024 18:44:46 +0100 Subject: [PATCH 01/17] Testing 5etools. --- ct/5etools.sh | 0 install/5etools-install.sh | 63 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 ct/5etools.sh create mode 100644 install/5etools-install.sh diff --git a/ct/5etools.sh b/ct/5etools.sh new file mode 100644 index 00000000000..e69de29bb2d diff --git a/install/5etools-install.sh b/install/5etools-install.sh new file mode 100644 index 00000000000..18356f20b58 --- /dev/null +++ b/install/5etools-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 community-scripts ORG +# Author: TheRealVira +# License: MIT +# Source: https://5e.tools/ + +# Import Functions und Setup +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + git \ + jq \ + apache2 + +msg_ok "Installed Dependencies" + +# Setup App +msg_info "Setup 5etools" +echo "\n"\ +" SetHandler server-status\n"\ +" Order deny,allow\n"\ +" Allow from all\n"\ +"\n"\ +>> /usr/local/apache2/conf/httpd.conf + +rm /usr/local/apache2/htdocs/index.html +wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip" +unzip -q "${RELEASE}.zip" +mv "${APP}-src-${RELEASE}/" "/opt/${APP}" + +chown -R www-data: "/opt/${APP}" +chmod -R 755 "/opt/${APP}" + +# Cleaning up +msg_info "Cleaning Up" +rm -rf "v${RELEASE}.zip" +msg_ok "Setup 5etools" + +# Starting httpd +msg_info "Starting httpd" +httpd-foreground +msg_ok "Started httpd" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f "/opt/v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From a7eadb0acb0b92a105a92e249ee5f19f52d52af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 19:05:09 +0100 Subject: [PATCH 02/17] Introducing Pf2eTools --- ct/5etools.sh | 0 ct/Pf2eTools.sh | 70 ++++++++++++++++++++++++++++++++++++ install/5etools-install.sh | 63 -------------------------------- install/Pf2eTools-install.sh | 55 ++++++++++++++++++++++++++++ json/Pf2eTools.json | 34 ++++++++++++++++++ 5 files changed, 159 insertions(+), 63 deletions(-) delete mode 100644 ct/5etools.sh create mode 100644 ct/Pf2eTools.sh delete mode 100644 install/5etools-install.sh create mode 100644 install/Pf2eTools-install.sh create mode 100644 json/Pf2eTools.json diff --git a/ct/5etools.sh b/ct/5etools.sh deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh new file mode 100644 index 00000000000..839eaf3cade --- /dev/null +++ b/ct/Pf2eTools.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: TheRealVira +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://pf2etools.com/ + +# App Default Values +APP="Pf2eTools" +var_tags="wiki" +var_cpu="1" +var_ram="512" +var_disk="6" +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 + + # Check if installation is present | -f for file, -d for folder + if [[ ! -d "/opt/${APP}" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + # Crawling the new version and checking whether an update is required + msg_info "Updating System" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated System" + + # Execute Update + msg_info "Updating Pf2eTools" + cd /opt/Pf2eTools + git config --global http.postBuffer 1048576000 + git config --global https.postBuffer 1048576000 + git pull --recurse-submodules --jobs=10 + msg_ok "Updated Pf2eTools" + + chown -R www-data: "/opt/${APP}" + chmod -R 755 "/opt/${APP}" + + # Cleaning up + msg_info "Cleaning Up" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleanup Completed" + 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}${CL}" \ No newline at end of file diff --git a/install/5etools-install.sh b/install/5etools-install.sh deleted file mode 100644 index 18356f20b58..00000000000 --- a/install/5etools-install.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 community-scripts ORG -# Author: TheRealVira -# License: MIT -# Source: https://5e.tools/ - -# Import Functions und Setup -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) -msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - sudo \ - git \ - jq \ - apache2 - -msg_ok "Installed Dependencies" - -# Setup App -msg_info "Setup 5etools" -echo "\n"\ -" SetHandler server-status\n"\ -" Order deny,allow\n"\ -" Allow from all\n"\ -"\n"\ ->> /usr/local/apache2/conf/httpd.conf - -rm /usr/local/apache2/htdocs/index.html -wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip" -unzip -q "${RELEASE}.zip" -mv "${APP}-src-${RELEASE}/" "/opt/${APP}" - -chown -R www-data: "/opt/${APP}" -chmod -R 755 "/opt/${APP}" - -# Cleaning up -msg_info "Cleaning Up" -rm -rf "v${RELEASE}.zip" -msg_ok "Setup 5etools" - -# Starting httpd -msg_info "Starting httpd" -httpd-foreground -msg_ok "Started httpd" - -motd_ssh -customize - -# Cleanup -msg_info "Cleaning up" -rm -f "/opt/v${RELEASE}.zip" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh new file mode 100644 index 00000000000..b80783edc18 --- /dev/null +++ b/install/Pf2eTools-install.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: TheRealVira +# License: MIT +# Source: https://pf2etools.com/ + +# Import Functions und Setup +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 \ + sudo \ + git \ + apache2 +msg_ok "Installed Dependencies" + +# Setup App +msg_info "Setup Pf2eTools" +rm -rf /var/www/html +git config --global http.postBuffer 1048576000 +git config --global https.postBuffer 1048576000 +git clone https://github.com/Pf2eToolsOrg/Pf2eTools /opt/Pf2eTools +msg_ok "Set up Pf2eTools" + +msg_info "Creating Service" +cat <> /etc/apache2/apache2.conf + + SetHandler server-status + Order deny,allow + Allow from all + +EOF +ln -s "/opt/Pf2eTools" /var/www/html + +chown -R www-data: "/opt/Pf2eTools" +chmod -R 755 "/opt/Pf2eTools" +apache2ctl start +msg_ok "Creating Service" +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize \ No newline at end of file diff --git a/json/Pf2eTools.json b/json/Pf2eTools.json new file mode 100644 index 00000000000..d7fedec66df --- /dev/null +++ b/json/Pf2eTools.json @@ -0,0 +1,34 @@ +{ + "name": "Pf2eTools", + "slug": "Pf2eTools", + "categories": [ + 0 + ], + "date_created": "2025-01-01", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://github.com/Pf2eToolsOrg/Pf2eTools/wiki", + "website": "https://pf2etools.com/", + "logo": "https://raw.githubusercontent.com/Pf2eToolsOrg/Pf2eTools/refs/heads/dev/android-chrome-192x192.png", + "description": "Pf2eTools is an open-source website aiming to provide tools and information for Pathfinder 2nd Edition players and gamemasters. It's built using basic web technologies to ensure wide compatibility, and utilises client-side caching for speed, efficiency, and offline access.", + "install_methods": [ + { + "type": "default", + "script": "ct/Pf2eTools.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From 933df2556d24e982c9086e155e0870fe8d7be5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 19:06:22 +0100 Subject: [PATCH 03/17] Replacing name with var. --- ct/Pf2eTools.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index 839eaf3cade..aa29996f87c 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -42,12 +42,12 @@ function update_script() { msg_ok "Updated System" # Execute Update - msg_info "Updating Pf2eTools" - cd /opt/Pf2eTools + msg_info "Updating ${APP}" + cd "/opt/${APP}" git config --global http.postBuffer 1048576000 git config --global https.postBuffer 1048576000 git pull --recurse-submodules --jobs=10 - msg_ok "Updated Pf2eTools" + msg_ok "Updated ${APP}" chown -R www-data: "/opt/${APP}" chmod -R 755 "/opt/${APP}" From 123cc7cde4fa9b5c90e34906a9011be9c2fa4f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 19:42:51 +0100 Subject: [PATCH 04/17] Switched to release crawling. --- ct/Pf2eTools.sh | 46 ++++++++++++++++++++---------------- install/Pf2eTools-install.sh | 11 +++++---- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index aa29996f87c..fd0ede7b1f8 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -35,28 +35,34 @@ function update_script() { exit fi - # Crawling the new version and checking whether an update is required - msg_info "Updating System" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null - msg_ok "Updated System" + RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then + # Crawling the new version and checking whether an update is required + msg_info "Updating System" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated System" - # Execute Update - msg_info "Updating ${APP}" - cd "/opt/${APP}" - git config --global http.postBuffer 1048576000 - git config --global https.postBuffer 1048576000 - git pull --recurse-submodules --jobs=10 - msg_ok "Updated ${APP}" + # Execute Update + msg_info "Updating ${APP}" + cd "/opt/${APP}" + wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" + unzip "${RELEASE}.zip" -d /opt/${APP} + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" - chown -R www-data: "/opt/${APP}" - chmod -R 755 "/opt/${APP}" + chown -R www-data: "/opt/${APP}" + chmod -R 755 "/opt/${APP}" - # Cleaning up - msg_info "Cleaning Up" - $STD apt-get -y autoremove - $STD apt-get -y autoclean - msg_ok "Cleanup Completed" + # Cleaning up + msg_info "Cleaning Up" + rm "${RELEASE}.zip" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleanup Completed" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit } @@ -67,4 +73,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}${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index b80783edc18..71b9f74293b 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -19,16 +19,16 @@ $STD apt-get install -y \ curl \ mc \ sudo \ - git \ + unzip \ apache2 msg_ok "Installed Dependencies" # Setup App msg_info "Setup Pf2eTools" -rm -rf /var/www/html -git config --global http.postBuffer 1048576000 -git config --global https.postBuffer 1048576000 -git clone https://github.com/Pf2eToolsOrg/Pf2eTools /opt/Pf2eTools +RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" +unzip "${RELEASE}.zip" -d /opt/Pf2eTools +echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" msg_info "Creating Service" @@ -47,6 +47,7 @@ apache2ctl start msg_ok "Creating Service" # Cleanup msg_info "Cleaning up" +rm "${RELEASE}.zip" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From fcf1f97eb551c006c8e051e57abb541c58f67a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 19:43:22 +0100 Subject: [PATCH 05/17] Re-added git. --- install/Pf2eTools-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index 71b9f74293b..c124a12568c 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -20,7 +20,8 @@ $STD apt-get install -y \ mc \ sudo \ unzip \ - apache2 + apache2 \ + git msg_ok "Installed Dependencies" # Setup App From b28040331bdcf26ca38cb2df0289551971c535ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 21:20:52 +0100 Subject: [PATCH 06/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index c124a12568c..07c3021eabf 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -19,7 +19,6 @@ $STD apt-get install -y \ curl \ mc \ sudo \ - unzip \ apache2 \ git msg_ok "Installed Dependencies" @@ -54,4 +53,4 @@ $STD apt-get -y autoclean msg_ok "Cleaned" motd_ssh -customize \ No newline at end of file +customize From ef503c98b3a1170d15e5534957b555e26bbda050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 21:44:13 +0100 Subject: [PATCH 07/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index 07c3021eabf..5909ce0c0e0 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -39,6 +39,7 @@ cat <> /etc/apache2/apache2.conf Allow from all EOF +rm -rf /var/www/html ln -s "/opt/Pf2eTools" /var/www/html chown -R www-data: "/opt/Pf2eTools" From 8db6ecea5a4918f5c06eb22dcf3c4e4c6b691c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 21:48:03 +0100 Subject: [PATCH 08/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index 5909ce0c0e0..b8ab288686a 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setup Pf2eTools" RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -unzip "${RELEASE}.zip" -d /opt/Pf2eTools +unzip -j "${RELEASE}.zip" -d /opt/Pf2eTools echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" From 10a1ed6b1edb409612f6a7a536638c18c4126b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 21:48:19 +0100 Subject: [PATCH 09/17] Update Pf2eTools.sh --- ct/Pf2eTools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index fd0ede7b1f8..44160562c39 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -47,7 +47,7 @@ function update_script() { msg_info "Updating ${APP}" cd "/opt/${APP}" wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" - unzip "${RELEASE}.zip" -d /opt/${APP} + unzip -j "${RELEASE}.zip" -d /opt/${APP} echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" From 1072109f6e39fb6d9771fbf29eedef2109897e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 22:07:11 +0100 Subject: [PATCH 10/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index b8ab288686a..f02ebaea322 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -27,7 +27,8 @@ msg_ok "Installed Dependencies" msg_info "Setup Pf2eTools" RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -unzip -j "${RELEASE}.zip" -d /opt/Pf2eTools +unzip "${RELEASE}.zip" +mv "Pf2eTools-${RELEASE}" /opt/Pf2eTools echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" From 31a01a23a8a80358bed79d8c7107be1969864fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 22:07:38 +0100 Subject: [PATCH 11/17] Update Pf2eTools.sh --- ct/Pf2eTools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index 44160562c39..eeca5847943 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -47,7 +47,8 @@ function update_script() { msg_info "Updating ${APP}" cd "/opt/${APP}" wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" - unzip -j "${RELEASE}.zip" -d /opt/${APP} + unzip "${RELEASE}.zip" + mv "${APP}-${RELEASE}" /opt/Pf2eTools echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" From 34ce30e0a7957d62cdacc54b08d4d84a0fade3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 22:08:55 +0100 Subject: [PATCH 12/17] Update Pf2eTools.sh --- ct/Pf2eTools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index eeca5847943..d7cbad0dc43 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -48,7 +48,7 @@ function update_script() { cd "/opt/${APP}" wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" unzip "${RELEASE}.zip" - mv "${APP}-${RELEASE}" /opt/Pf2eTools + mv "${APP}-${RELEASE:1}" /opt/Pf2eTools echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" From e2da06b52cbe2590e8b2212074f5eaf9d4be047f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 22:09:10 +0100 Subject: [PATCH 13/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index f02ebaea322..8ade15aaf2f 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -28,7 +28,7 @@ msg_info "Setup Pf2eTools" RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" unzip "${RELEASE}.zip" -mv "Pf2eTools-${RELEASE}" /opt/Pf2eTools +mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" From 79900ccb098cb0445bae3f96354ed1e30cf3e5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 23:00:50 +0100 Subject: [PATCH 14/17] Update Pf2eTools.sh --- ct/Pf2eTools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index d7cbad0dc43..bf5ac2e9a4b 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -47,7 +47,7 @@ function update_script() { msg_info "Updating ${APP}" cd "/opt/${APP}" wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" - unzip "${RELEASE}.zip" + unzip -q "${RELEASE}.zip" mv "${APP}-${RELEASE:1}" /opt/Pf2eTools echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" From ba536127b36c354b311acf16acd85f8077e95bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 23:01:04 +0100 Subject: [PATCH 15/17] Update Pf2eTools-install.sh --- install/Pf2eTools-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/Pf2eTools-install.sh b/install/Pf2eTools-install.sh index 8ade15aaf2f..d245d34626f 100644 --- a/install/Pf2eTools-install.sh +++ b/install/Pf2eTools-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setup Pf2eTools" RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -unzip "${RELEASE}.zip" +unzip -q "${RELEASE}.zip" mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" From d06aeea8cbecbeca750c2e79a22b83fe0b6666c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Thu, 2 Jan 2025 08:06:34 +0100 Subject: [PATCH 16/17] Update Pf2eTools.sh Fix update script --- ct/Pf2eTools.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/Pf2eTools.sh b/ct/Pf2eTools.sh index bf5ac2e9a4b..43d693c8700 100644 --- a/ct/Pf2eTools.sh +++ b/ct/Pf2eTools.sh @@ -48,8 +48,9 @@ function update_script() { cd "/opt/${APP}" wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" unzip -q "${RELEASE}.zip" - mv "${APP}-${RELEASE:1}" /opt/Pf2eTools - echo "${RELEASE}" >/opt/${APP}_version.txt + rm -rf "/opt/${APP}" + mv "${APP}-${RELEASE:1}" "/opt/${APP}" + echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP}" chown -R www-data: "/opt/${APP}" From dc801cbb31b1af8d9bdb766f66a4ffcdeb0e1066 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:48:33 +0100 Subject: [PATCH 17/17] Update Pf2eTools.json --- json/Pf2eTools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/Pf2eTools.json b/json/Pf2eTools.json index d7fedec66df..0dbb2b4727f 100644 --- a/json/Pf2eTools.json +++ b/json/Pf2eTools.json @@ -4,7 +4,7 @@ "categories": [ 0 ], - "date_created": "2025-01-01", + "date_created": "2025-01-02", "type": "ct", "updateable": true, "privileged": false, @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +}