From 30b221150171e8eb12d3bc9247a49779099efb27 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:45:00 +0100 Subject: [PATCH] minor fixes --- ct/hoodik.sh | 16 ++-------- frontend/public/json/hoodik.json | 52 ++++++++++++++++++++++++++++++++ install/hoodik-install.sh | 28 +++++------------ install/koel-install.sh | 5 --- 4 files changed, 63 insertions(+), 38 deletions(-) create mode 100644 frontend/public/json/hoodik.json diff --git a/ct/hoodik.sh b/ct/hoodik.sh index c9524aa5..00c9c31e 100644 --- a/ct/hoodik.sh +++ b/ct/hoodik.sh @@ -29,10 +29,7 @@ function update_script() { exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - CURRENT_VERSION=$(cat /opt/hoodik_version.txt 2>/dev/null || echo "none") - - if [[ "${RELEASE}" != "${CURRENT_VERSION}" ]]; then + if check_for_gh_release "hoodik" "hudikhq/hoodik"; then msg_info "Stopping Services" systemctl stop hoodik msg_ok "Stopped Services" @@ -41,18 +38,14 @@ function update_script() { cp /opt/hoodik/.env /tmp/hoodik.env.bak msg_ok "Backed up Configuration" - msg_info "Updating ${APP} to ${RELEASE} (Patience - this takes 10-15 minutes)" + msg_info "Updating ${APP} (Patience - this takes 10-15 minutes)" source ~/.cargo/env - cd /opt rm -rf /opt/hoodik - curl -fsSL "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" - unzip -q "${RELEASE}.zip" - mv "hoodik-${RELEASE#v}" hoodik + fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik" cd /opt/hoodik $STD cargo build --release cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik chmod +x /usr/local/bin/hoodik - echo "${RELEASE}" >/opt/hoodik_version.txt msg_ok "Updated ${APP}" msg_info "Restoring Configuration" @@ -61,7 +54,6 @@ function update_script() { msg_ok "Restored Configuration" msg_info "Cleaning Up" - rm -f /opt/${RELEASE}.zip rm -rf /opt/hoodik/target msg_ok "Cleaned" @@ -70,8 +62,6 @@ function update_script() { msg_ok "Started Services" msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" fi exit } diff --git a/frontend/public/json/hoodik.json b/frontend/public/json/hoodik.json new file mode 100644 index 00000000..cf27702e --- /dev/null +++ b/frontend/public/json/hoodik.json @@ -0,0 +1,52 @@ +{ + "name": "Hoodik", + "slug": "hoodik", + "categories": [ + 4 + ], + "date_created": "2024-06-15", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 5443, + "documentation": "https://github.com/hudikhq/hoodik#readme", + "config_path": "/opt/hoodik/.env", + "website": "https://github.com/hudikhq/hoodik", + "logo": "https://raw.githubusercontent.com/hudikhq/hoodik/main/web/public/logo-small.png", + "description": "Hoodik is a lightweight, self-hosted cloud storage solution with end-to-end encryption. Files are encrypted on your device before upload using hybrid RSA/AES encryption, ensuring only you can access your data.", + "install_methods": [ + { + "type": "default", + "script": "ct/hoodik.sh", + "resources": { + "cpu": 4, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "First visit will prompt you to create an admin account", + "type": "info" + }, + { + "text": "Installation builds from source and takes 10-15 minutes", + "type": "warning" + }, + { + "text": "Data is stored in /opt/hoodik_data", + "type": "info" + }, + { + "text": "SSL is disabled by default - use a reverse proxy for HTTPS", + "type": "warning" + } + ] +} diff --git a/install/hoodik-install.sh b/install/hoodik-install.sh index adf629d1..21806dbd 100644 --- a/install/hoodik-install.sh +++ b/install/hoodik-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt install -y \ +$STD apt-get install -y \ pkg-config \ libssl-dev \ libc6-dev \ @@ -26,23 +26,17 @@ $STD apt install -y \ make msg_ok "Installed Dependencies" -msg_info "Installing Rust" -$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y -source ~/.cargo/env -msg_ok "Installed Rust" +setup_rust +fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik" -msg_info "Building Hoodik (Patience - this takes 10-15 minutes)" -RELEASE=$(curl -fsSL https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /opt -curl -fsSL "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" -unzip -q "${RELEASE}.zip" -mv "hoodik-${RELEASE#v}" hoodik +msg_info "Building Hoodik" cd /opt/hoodik +source ~/.cargo/env $STD cargo build --release cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik chmod +x /usr/local/bin/hoodik -echo "${RELEASE}" >/opt/hoodik_version.txt -msg_ok "Built Hoodik ${RELEASE}" +rm -rf /opt/hoodik/target +msg_ok "Built Hoodik" msg_info "Configuring Hoodik" mkdir -p /opt/hoodik_data @@ -82,10 +76,4 @@ msg_ok "Created Service" motd_ssh customize - -msg_info "Cleaning up" -rm -f /opt/${RELEASE}.zip -rm -rf /opt/hoodik/target -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" +cleanup_lxc diff --git a/install/koel-install.sh b/install/koel-install.sh index 4ef7a949..487fc593 100644 --- a/install/koel-install.sh +++ b/install/koel-install.sh @@ -19,10 +19,6 @@ $STD apt install -y \ ffmpeg \ cron \ locales -$STD sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen -$STD locale-gen en_US.UTF-8 -export LANG=en_US.UTF-8 -export LC_ALL=en_US.UTF-8 msg_ok "Installed Dependencies" import_local_ip @@ -37,7 +33,6 @@ fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" " msg_info "Configuring Koel" mkdir -p /opt/koel_media /opt/koel_sync cd /opt/koel - cat </opt/koel/.env APP_NAME=Koel APP_ENV=production