mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-03-31 06:24:18 -04:00
fix: second round audit - backup paths, cleanup, dead code
CT scripts: - ct/hoodik.sh: backup to /opt instead of /tmp - ct/pixelfed.sh: backup to /opt, add CLEAN_INSTALL=1 - ct/skylite-ux.sh: backup to /opt instead of /tmp Install scripts: - install/alpine-install.sh: add missing cleanup_lxc - install/ubuntu-install.sh: replace manual apt-get cleanup with cleanup_lxc - install/debian-install.sh: apt-get -> apt - install/hoodik-install.sh: remove 40 lines of dead commented code - install/step-ca-install.sh: remove from export builtins
This commit is contained in:
@@ -36,7 +36,7 @@ function update_script() {
|
|||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
msg_info "Backing up Configuration"
|
msg_info "Backing up Configuration"
|
||||||
cp /opt/hoodik/.env /tmp/hoodik.env.bak
|
cp /opt/hoodik/.env /opt/hoodik.env.bak
|
||||||
msg_ok "Backed up Configuration"
|
msg_ok "Backed up Configuration"
|
||||||
|
|
||||||
msg_info "Updating Hoodik (Patience - this takes 15-20 minutes)"
|
msg_info "Updating Hoodik (Patience - this takes 15-20 minutes)"
|
||||||
@@ -58,8 +58,8 @@ function update_script() {
|
|||||||
msg_ok "Updated Hoodik"
|
msg_ok "Updated Hoodik"
|
||||||
|
|
||||||
msg_info "Restoring Configuration"
|
msg_info "Restoring Configuration"
|
||||||
cp /tmp/hoodik.env.bak /opt/hoodik/.env
|
cp /opt/hoodik.env.bak /opt/hoodik/.env
|
||||||
rm -f /tmp/hoodik.env.bak
|
rm -f /opt/hoodik.env.bak
|
||||||
msg_ok "Restored Configuration"
|
msg_ok "Restored Configuration"
|
||||||
|
|
||||||
msg_info "Cleaning Up"
|
msg_info "Cleaning Up"
|
||||||
|
|||||||
@@ -36,14 +36,14 @@ function update_script() {
|
|||||||
msg_ok "Services stopped"
|
msg_ok "Services stopped"
|
||||||
|
|
||||||
msg_info "Backing up Configuration"
|
msg_info "Backing up Configuration"
|
||||||
cp /opt/pixelfed/.env /tmp/pixelfed.env.bak
|
cp /opt/pixelfed/.env /opt/pixelfed.env.bak
|
||||||
msg_ok "Configuration backed up"
|
msg_ok "Configuration backed up"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "pixelfed" "pixelfed/pixelfed" "tarball" "latest" "/opt/pixelfed"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pixelfed" "pixelfed/pixelfed" "tarball" "latest" "/opt/pixelfed"
|
||||||
|
|
||||||
msg_info "Restoring Configuration"
|
msg_info "Restoring Configuration"
|
||||||
cp /tmp/pixelfed.env.bak /opt/pixelfed/.env
|
cp /opt/pixelfed.env.bak /opt/pixelfed/.env
|
||||||
rm -f /tmp/pixelfed.env.bak
|
rm -f /opt/pixelfed.env.bak
|
||||||
msg_ok "Configuration restored"
|
msg_ok "Configuration restored"
|
||||||
|
|
||||||
msg_info "Updating Pixelfed"
|
msg_info "Updating Pixelfed"
|
||||||
|
|||||||
@@ -36,14 +36,14 @@ function update_script() {
|
|||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Backing up Data"
|
msg_info "Backing up Data"
|
||||||
cp /opt/skylite-ux/.env /tmp/skylite-ux.env.backup
|
cp /opt/skylite-ux/.env /opt/skylite-ux.env.bak
|
||||||
msg_ok "Backed up Data"
|
msg_ok "Backed up Data"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "skylite-ux" "Wetzel402/Skylite-UX" "tarball"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "skylite-ux" "Wetzel402/Skylite-UX" "tarball"
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
cp /tmp/skylite-ux.env.backup /opt/skylite-ux/.env
|
cp /opt/skylite-ux.env.bak /opt/skylite-ux/.env
|
||||||
rm -f /tmp/skylite-ux.env.backup
|
rm -f /opt/skylite-ux.env.bak
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
msg_info "Building Skylite-UX"
|
msg_info "Building Skylite-UX"
|
||||||
|
|||||||
@@ -23,3 +23,4 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
cleanup_lxc
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ update_os
|
|||||||
setup_hwaccel
|
setup_hwaccel
|
||||||
|
|
||||||
msg_info "Installing Base Dependencies"
|
msg_info "Installing Base Dependencies"
|
||||||
$STD apt-get install -y curl wget ca-certificates
|
$STD apt install -y curl wget ca-certificates
|
||||||
msg_ok "Installed Base Dependencies"
|
msg_ok "Installed Base Dependencies"
|
||||||
|
|
||||||
# msg_info "Downloading and executing tools.func test suite"
|
# msg_info "Downloading and executing tools.func test suite"
|
||||||
|
|||||||
@@ -13,48 +13,8 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
#msg_info "Installing Dependencies"
|
|
||||||
#$STD apt-get install -y \
|
|
||||||
# pkg-config \
|
|
||||||
# libssl-dev \
|
|
||||||
# libc6-dev \
|
|
||||||
# libpq-dev \
|
|
||||||
# clang \
|
|
||||||
# llvm \
|
|
||||||
# nettle-dev \
|
|
||||||
# build-essential \
|
|
||||||
# make
|
|
||||||
#msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
#setup_rust
|
|
||||||
#NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
|
||||||
#fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "tarball" "latest" "/opt/hoodik"
|
|
||||||
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz"
|
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz"
|
||||||
|
|
||||||
#msg_info "Installing wasm-pack"
|
|
||||||
#$STD cargo install wasm-pack
|
|
||||||
#msg_ok "Installed wasm-pack"
|
|
||||||
|
|
||||||
#msg_info "Building Hoodik Frontend"
|
|
||||||
#cd /opt/hoodik
|
|
||||||
#$STD yarn install --frozen-lockfile
|
|
||||||
#$STD yarn wasm-pack
|
|
||||||
#$STD yarn web:build
|
|
||||||
#msg_ok "Built Hoodik Frontend"
|
|
||||||
|
|
||||||
#msg_info "Building Hoodik Backend"
|
|
||||||
#cd /opt/hoodik
|
|
||||||
#$STD cargo build --release
|
|
||||||
#cp /opt/hoodik/target/release/hoodik /usr/local/bin/hoodik
|
|
||||||
#chmod +x /usr/local/bin/hoodik
|
|
||||||
#msg_ok "Built Hoodik Backend"
|
|
||||||
|
|
||||||
#msg_info "Cleaning up build artifacts"
|
|
||||||
#rm -rf /opt/hoodik/target
|
|
||||||
#rm -rf /root/.cargo/registry
|
|
||||||
#rm -rf /opt/hoodik/node_modules
|
|
||||||
#msg_ok "Cleaned up build artifacts"
|
|
||||||
|
|
||||||
msg_info "Configuring Hoodik"
|
msg_info "Configuring Hoodik"
|
||||||
mkdir -p /opt/hoodik_data
|
mkdir -p /opt/hoodik_data
|
||||||
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
||||||
@@ -81,7 +41,6 @@ Type=simple
|
|||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/hoodik_data
|
WorkingDirectory=/opt/hoodik_data
|
||||||
EnvironmentFile=/opt/hoodik/.env
|
EnvironmentFile=/opt/hoodik/.env
|
||||||
#ExecStart=/usr/local/bin/hoodik
|
|
||||||
ExecStart=/opt/hoodik
|
ExecStart=/opt/hoodik
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ msg_info "Installing step-ca and step-cli"
|
|||||||
$STD apt install -y step-ca step-cli
|
$STD apt install -y step-ca step-cli
|
||||||
|
|
||||||
STEPHOME="/root/.step"
|
STEPHOME="/root/.step"
|
||||||
$STD export STEPPATH=/etc/step-ca
|
export STEPPATH=/etc/step-ca
|
||||||
$STD export STEPHOME=$STEPHOME
|
export STEPHOME=$STEPHOME
|
||||||
|
|
||||||
$STD sed -i '1i export STEPPATH=/etc/step-ca' /etc/profile
|
$STD sed -i '1i export STEPPATH=/etc/step-ca' /etc/profile
|
||||||
$STD sed -i '1i export STEPHOME=/root/.step' /etc/profile
|
$STD sed -i '1i export STEPHOME=/root/.step' /etc/profile
|
||||||
|
|||||||
@@ -14,13 +14,9 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y jq
|
$STD apt install -y jq
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
cleanup_lxc
|
||||||
msg_info "Cleaning up"
|
|
||||||
$STD apt-get -y autoremove
|
|
||||||
$STD apt-get -y autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user