From a96827dac02945a2a469bde545c7225778372acd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:21:57 +0200 Subject: [PATCH] dev --- ct/rclone.sh | 43 ++++++++++++++++++++++++++++++ install/rclone-install.sh | 50 +++++++++++++++++++++++++++++++++++ misc/build.func | 9 +++---- scripts/tools/grafana-loki.sh | 32 ++++++++++++++++++++++ 4 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 ct/rclone.sh create mode 100644 install/rclone-install.sh create mode 100644 scripts/tools/grafana-loki.sh diff --git a/ct/rclone.sh b/ct/rclone.sh new file mode 100644 index 0000000..0b251f5 --- /dev/null +++ b/ct/rclone.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://rclone.org/ + +APP="Rclone" +var_tags="${var_tags:-os}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" +var_fuse="${var_fuse:-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}" diff --git a/install/rclone-install.sh b/install/rclone-install.sh new file mode 100644 index 0000000..6159b79 --- /dev/null +++ b/install/rclone-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +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 \ + gnupg2 \ + fuse +msg_ok "Installed Dependencies" + +msg_info "Installing rclone" +wget https://downloads.rclone.org/v1.69.1/rclone-v1.69.1-linux-amd64.deb +dpkg -i rclone-v1.69.1-linux-amd64.deb +msg_ok "Installed rclone" + +cat </etc/systemd/system/rclone-web.service +[Unit] +Description=Rclone Web GUI +After=network-online.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345 +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now rclone-web + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/misc/build.func b/misc/build.func index 162f36b..60ce07c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -388,8 +388,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - # 26.03.2025 disabled - #ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} + ENABLE_FUSE=${var_fuse:-$ENABLE_FUSE} # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then @@ -1398,9 +1397,9 @@ build_container() { FEATURES="nesting=1" fi # 26.03.2025 disabled - #if [ "$ENABLE_FUSE" == "yes" ]; then - # FEATURES+=",fuse=1" - #fi + if [ "$ENABLE_FUSE" == "yes" ]; then + FEATURES+=",fuse=1" + fi if [[ $DIAGNOSTICS == "yes" ]]; then post_to_api diff --git a/scripts/tools/grafana-loki.sh b/scripts/tools/grafana-loki.sh new file mode 100644 index 0000000..b68a804 --- /dev/null +++ b/scripts/tools/grafana-loki.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +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 gnupg2 +msg_ok "Installed Dependencies" + +msg_info "Setting up rclone" +wget https://github.com/rclone/rclone/releases/download/v1.69.1/rclone-v1.69.1-linux-amd64.de +dpkg -i rclone-v1.69.1-linux-amd64.deb +rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345 +msg_ok "Set up Grafana" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"