diff --git a/ct/hoodik.sh b/ct/hoodik.sh index dadbc842..c63a175e 100644 --- a/ct/hoodik.sh +++ b/ct/hoodik.sh @@ -8,9 +8,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV APP="Hoodik" var_tags="${var_tags:-cloud;storage}" -var_cpu="${var_cpu:-4}" -var_ram="${var_ram:-4096}" -var_disk="${var_disk:-20}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-5}" var_os="${var_os:-debian}" var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" @@ -25,53 +25,31 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /usr/local/bin/hoodik ]]; then + if [[ ! -f /opt/hoodik/hoodik ]]; then msg_error "No ${APP} Installation Found!" exit fi if check_for_gh_release "hoodik" "hudikhq/hoodik"; then - msg_info "Stopping Services" + msg_info "Stopping Service" systemctl stop hoodik - msg_ok "Stopped Services" + msg_ok "Stopped Service" msg_info "Backing up Configuration" cp /opt/hoodik/.env /opt/hoodik.env.bak msg_ok "Backed up Configuration" - msg_info "Updating Hoodik (Patience - this takes 15-20 minutes)" - source ~/.cargo/env - rm -rf /opt/hoodik - fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik" - cd /opt/hoodik - - msg_info "Building Frontend" - $STD yarn install --frozen-lockfile - $STD yarn wasm-pack - $STD yarn web:build - msg_ok "Built Frontend" - - msg_info "Building Backend" - $STD cargo build --release - cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik - chmod +x /usr/local/bin/hoodik - msg_ok "Updated Hoodik" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz" msg_info "Restoring Configuration" cp /opt/hoodik.env.bak /opt/hoodik/.env rm -f /opt/hoodik.env.bak msg_ok "Restored Configuration" - msg_info "Cleaning Up" - rm -rf /opt/hoodik/target - rm -rf /root/.cargo/registry - rm -rf /opt/hoodik/node_modules - msg_ok "Cleaned" - - msg_info "Starting Services" + msg_info "Starting Service" systemctl start hoodik - msg_ok "Started Services" - msg_ok "Updated Successfully" + msg_ok "Started Service" + msg_ok "Updated successfully!" fi exit } @@ -83,4 +61,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}:5443${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5443/auth/register${CL}" diff --git a/install/hoodik-install.sh b/install/hoodik-install.sh index 8edc7e63..1138e4c4 100644 --- a/install/hoodik-install.sh +++ b/install/hoodik-install.sh @@ -23,8 +23,10 @@ DATA_DIR=/opt/hoodik_data HTTP_PORT=5443 HTTP_ADDRESS=0.0.0.0 JWT_SECRET=${JWT_SECRET} -APP_URL=http://127.0.0.1:5443 +APP_URL=http://${LOCAL_IP}:5443 SSL_DISABLED=true +COOKIE_SECURE=false +COOKIE_HTTP_ONLY=false MAILER_TYPE=none RUST_LOG=hoodik=info,error=info EOF @@ -41,14 +43,14 @@ Type=simple User=root WorkingDirectory=/opt/hoodik_data EnvironmentFile=/opt/hoodik/.env -ExecStart=/opt/hoodik +ExecStart=/opt/hoodik/hoodik Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now hoodik.service +systemctl enable -q --now hoodik msg_ok "Created Service" motd_ssh