mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-25 11:11:02 +00:00
[core] remove unneeded vars from shellcheck (#3899)
* remove unneeded wars * Update alpine-wireguard-install.sh --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ function update_script() {
|
||||
|
||||
if [[ -d /etc/wgdashboard/src ]]; then
|
||||
msg_info "update WGDashboard"
|
||||
cd /etc/wgdashboard/src || exit
|
||||
cd /etc/wgdashboard/src
|
||||
$STD echo "y" | ./wgd.sh update
|
||||
$STD ./wgd.sh start
|
||||
msg_ok "WGDashboard updated"
|
||||
|
@@ -42,7 +42,7 @@ function update_script() {
|
||||
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true
|
||||
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true
|
||||
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true
|
||||
cd /opt/bookstack || exit
|
||||
cd /opt/bookstack
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev
|
||||
$STD php artisan migrate --force
|
||||
|
@@ -200,11 +200,11 @@ if qm status "$CTID" &>/dev/null || pct status "$CTID" &>/dev/null; then
|
||||
fi
|
||||
|
||||
# Get template storage
|
||||
TEMPLATE_STORAGE=$(select_storage template) || exit
|
||||
TEMPLATE_STORAGE=$(select_storage template)
|
||||
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
|
||||
|
||||
# Get container storage
|
||||
CONTAINER_STORAGE=$(select_storage container) || exit
|
||||
CONTAINER_STORAGE=$(select_storage container)
|
||||
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
|
||||
|
||||
# Update LXC template list
|
||||
@@ -279,4 +279,4 @@ if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[
|
||||
exit 209
|
||||
fi
|
||||
fi
|
||||
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
|
||||
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
|
||||
|
@@ -32,7 +32,7 @@ function update_script() {
|
||||
msg_info "Updating ${APP}"
|
||||
systemctl stop ${APP}
|
||||
git clone https://github.com/revenz/Fenrus.git
|
||||
cd Fenrus || exit
|
||||
cd Fenrus
|
||||
gitVersionNumber=$(git rev-parse HEAD)
|
||||
|
||||
if [[ "${gitVersionNumber}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
@@ -66,4 +66,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}:5000${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
||||
|
@@ -50,7 +50,7 @@ function update_script() {
|
||||
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar -xzf "$temp_file"
|
||||
cp -rf "GoMFT-${RELEASE}"/* /opt/gomft/
|
||||
cd /opt/gomft || exit
|
||||
cd /opt/gomft
|
||||
rm -rf /opt/gomft/node_modules
|
||||
$STD npm ci
|
||||
$STD node build.js
|
||||
|
@@ -43,14 +43,14 @@ function update_script() {
|
||||
tar xzf "${RELEASE}".tar.gz
|
||||
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
cp -R Heimdall-"${VER}"/* /opt/Heimdall
|
||||
cd /opt/Heimdall || exit
|
||||
cd /opt/Heimdall
|
||||
$STD apt-get install -y composer
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer dump-autoload
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
|
||||
msg_info "Restoring Data"
|
||||
cd ~ || exit
|
||||
cd ~
|
||||
cp -R database-backup/* /opt/Heimdall/database
|
||||
cp -R public-backup/* /opt/Heimdall/public
|
||||
sleep 1
|
||||
|
@@ -40,7 +40,7 @@ function update_script() {
|
||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||
$STD apt-get install -y graphicsmagick ghostscript
|
||||
fi
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
||||
mkdir -p /etc/hoarder
|
||||
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
|
||||
@@ -49,14 +49,14 @@ function update_script() {
|
||||
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
unzip -q v"${RELEASE}".zip
|
||||
mv karakeep-"${RELEASE}" /opt/hoarder
|
||||
cd /opt/hoarder/apps/web || exit
|
||||
cd /opt/hoarder/apps/web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
|
||||
cd /opt/hoarder/apps/workers || exit
|
||||
cd /opt/hoarder/apps/workers
|
||||
$STD pnpm install --frozen-lockfile
|
||||
export DATA_DIR=/opt/hoarder_data
|
||||
cd /opt/hoarder/packages/db || exit
|
||||
cd /opt/hoarder/packages/db
|
||||
$STD pnpm migrate
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
@@ -40,7 +40,7 @@ function update_script() {
|
||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||
$STD apt-get install -y graphicsmagick ghostscript
|
||||
fi
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
if [[ -f /opt/karakeep/.env ]] && [[ ! -f /etc/karakeep/karakeep.env ]]; then
|
||||
mkdir -p /etc/karakeep
|
||||
mv /opt/karakeep/.env /etc/karakeep/karakeep.env
|
||||
@@ -49,14 +49,14 @@ function update_script() {
|
||||
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
unzip -q "v${RELEASE}.zip"
|
||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||
cd /opt/karakeep/apps/web || exit
|
||||
cd /opt/karakeep/apps/web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||
cd /opt/karakeep/apps/workers || exit
|
||||
cd /opt/karakeep/apps/workers
|
||||
$STD pnpm install --frozen-lockfile
|
||||
export DATA_DIR=/opt/karakeep_data
|
||||
cd /opt/karakeep/packages/db || exit
|
||||
cd /opt/karakeep/packages/db
|
||||
$STD pnpm migrate
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
@@ -66,7 +66,7 @@ function update_script() {
|
||||
[ -f "$BACKUP_DIR/.env" ] && cp "$BACKUP_DIR/.env" /opt/kimai/
|
||||
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
||||
rm -rf "$BACKUP_DIR"
|
||||
cd /opt/kimai || exit
|
||||
cd /opt/kimai
|
||||
$STD composer install --no-dev --optimize-autoloader
|
||||
$STD bin/console kimai:update
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
|
@@ -52,7 +52,7 @@ function update_script() {
|
||||
|
||||
msg_info "Downloading NPM v${RELEASE}"
|
||||
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
|
||||
cd nginx-proxy-manager-"${RELEASE}" || exit
|
||||
cd nginx-proxy-manager-"${RELEASE}"
|
||||
msg_ok "Downloaded NPM v${RELEASE}"
|
||||
|
||||
msg_info "Setting up Enviroment"
|
||||
@@ -103,7 +103,7 @@ function update_script() {
|
||||
msg_ok "Setup Enviroment"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd ./frontend || exit
|
||||
cd ./frontend
|
||||
$STD pnpm install
|
||||
$STD pnpm upgrade
|
||||
$STD pnpm run build
|
||||
@@ -128,7 +128,7 @@ function update_script() {
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
cd /app || exit
|
||||
cd /app
|
||||
$STD pnpm install
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
|
@@ -28,27 +28,26 @@ function update_script() {
|
||||
header_info "$APP"
|
||||
|
||||
case "$UPD" in
|
||||
"1")
|
||||
msg_info "Updating Alpine OS"
|
||||
apk update && apk upgrade
|
||||
msg_ok "System updated"
|
||||
exit
|
||||
;;
|
||||
"2")
|
||||
msg_info "Updating NPMplus Container"
|
||||
cd /opt || exit 1
|
||||
msg_info "Pulling latest container image"
|
||||
$STD docker compose pull
|
||||
msg_info "Recreating container"
|
||||
$STD docker compose up -d
|
||||
msg_ok "NPMplus container updated"
|
||||
exit
|
||||
;;
|
||||
"1")
|
||||
msg_info "Updating Alpine OS"
|
||||
apk update && apk upgrade
|
||||
msg_ok "System updated"
|
||||
exit
|
||||
;;
|
||||
"2")
|
||||
msg_info "Updating NPMplus Container"
|
||||
cd /opt 1
|
||||
msg_info "Pulling latest container image"
|
||||
$STD docker compose pull
|
||||
msg_info "Recreating container"
|
||||
$STD docker compose up -d
|
||||
msg_ok "NPMplus container updated"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
@@ -56,4 +55,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}https://${IP}:81${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:81${CL}"
|
||||
|
@@ -40,7 +40,7 @@ function update_script() {
|
||||
curl -fsSL "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar zxf "$temp_file"
|
||||
mv outline-"${RELEASE}" /opt/outline
|
||||
cd /opt/outline || exit
|
||||
cd /opt/outline
|
||||
export NODE_ENV=development
|
||||
export NODE_OPTIONS="--max-old-space-size=3584"
|
||||
$STD yarn install --frozen-lockfile
|
||||
|
@@ -47,7 +47,7 @@ function update_script() {
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
cd /opt/paymenter || exit
|
||||
cd /opt/paymenter
|
||||
$STD php artisan p:upgrade --no-interaction
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
|
@@ -27,7 +27,7 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
|
||||
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
||||
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
||||
@@ -47,7 +47,7 @@ function update_script() {
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
cd /opt/pelican-panel || exit
|
||||
cd /opt/pelican-panel
|
||||
$STD php artisan down
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
|
@@ -47,7 +47,7 @@ function update_script() {
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
cd /opt/pterodactyl-panel || exit
|
||||
cd /opt/pterodactyl-panel
|
||||
$STD php artisan down
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
|
@@ -44,7 +44,7 @@ function update_script() {
|
||||
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
||||
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
||||
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
||||
cd /opt/snipe-it/ || exit
|
||||
cd /opt/snipe-it/
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD composer dump-autoload
|
||||
|
@@ -36,15 +36,15 @@ function update_script() {
|
||||
else
|
||||
msg_info "Updating ${APP} (Patience)"
|
||||
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
|
||||
cd /opt/tandoor/ || exit
|
||||
cd /opt/tandoor/
|
||||
$STD pip3 install -r requirements.txt
|
||||
$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
|
||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
|
||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
|
||||
cd /opt/tandoor/vue || exit
|
||||
cd /opt/tandoor/vue
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
cd /opt/tandoor || exit
|
||||
cd /opt/tandoor
|
||||
$STD python3 version.py
|
||||
systemctl restart gunicorn_tandoor
|
||||
msg_ok "Updated ${APP}"
|
||||
|
@@ -38,7 +38,7 @@ function update_script() {
|
||||
cp -R /usr/share/zabbix/ /opt/zabbix-backup/
|
||||
#cp -R /usr/share/zabbix-* /opt/zabbix-backup/ Remove temporary
|
||||
rm -Rf /etc/apt/sources.list.d/zabbix.list
|
||||
cd /tmp || exit
|
||||
cd /tmp
|
||||
curl -fsSL "$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
||||
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1 |
|
||||
xargs -I{} echo "https://repo.zabbix.com/zabbix/{}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb")" \
|
||||
|
@@ -34,7 +34,7 @@ function update_script() {
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Updating $APP to ${RELEASE}"
|
||||
cd /tmp || exit
|
||||
cd /tmp
|
||||
curl -fsSL "https://github.com/zitadel/zitadel/releases/download/v$RELEASE/zitadel-linux-amd64.tar.gz" | tar -xz
|
||||
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
||||
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
||||
|
Reference in New Issue
Block a user