minor fixes

This commit is contained in:
CanbiZ 2025-12-09 14:45:00 +01:00
parent 557f74e512
commit 30b2211501
4 changed files with 63 additions and 38 deletions

View File

@ -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
}

View File

@ -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"
}
]
}

View File

@ -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

View File

@ -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 <<EOF >/opt/koel/.env
APP_NAME=Koel
APP_ENV=production