From ef2e68e3868f5b21ec7023241ab0a16e428d112f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:28:34 +0200 Subject: [PATCH] cloudreve --- ct/cloudreve.sh | 44 ++++++++++++++++++++++++++++ install/cloudreve-install.sh | 43 +++++++++++++++++++++++++++ install/nginxproxymanager-install.sh | 2 +- 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 ct/cloudreve.sh create mode 100644 install/cloudreve-install.sh diff --git a/ct/cloudreve.sh b/ct/cloudreve.sh new file mode 100644 index 00000000..37738513 --- /dev/null +++ b/ct/cloudreve.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://www.debian.org/ + +APP="Cloudreve" +var_tags="${var_tags:-cloud}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + 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}:5212${CL}" diff --git a/install/cloudreve-install.sh b/install/cloudreve-install.sh new file mode 100644 index 00000000..51a7dcb4 --- /dev/null +++ b/install/cloudreve-install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://hanko.io/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "cloudreve" "cloudreve/cloudreve" "prebuild" "latest" "/opt/cloudreve" "hanko_Linux_x86_64.tar.gz" + +msg_info "Setup Service" +cat </etc/systemd/system/cloudreve.service +[Unit] +Description=Cloudreve Service +After=network.target + +[Service] +Type=simple +ExecStart=/opt/cloudreve/cloudreve +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now cloudreve +msg_ok "Service Setup" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 55ee6d61..58141d8a 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -56,7 +56,7 @@ ln -sf /usr/bin/python3 /usr/bin/python ln -sf /opt/certbot/bin/certbot /usr/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf +sed -i 's+^daemon+#daemon+g' /tmp/nginxproxymanager/docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"