mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
fix: shellcheck changes (#10591)
This commit is contained in:
@@ -49,7 +49,7 @@ function update_script() {
|
||||
$STD unzip crafty-4-v"${RELEASE}".zip
|
||||
cp -a crafty-4-v"${RELEASE}"/. /opt/crafty-controller/crafty/crafty-4/
|
||||
rm -rf crafty-4-v"${RELEASE}"
|
||||
cd /opt/crafty-controller/crafty/crafty-4 || exit
|
||||
cd /opt/crafty-controller/crafty/crafty-4
|
||||
sudo -u crafty bash -c '
|
||||
source /opt/crafty-controller/crafty/.venv/bin/activate
|
||||
pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
@@ -41,7 +41,7 @@ function update_script() {
|
||||
|
||||
msg_info "Updating Livebook"
|
||||
source /opt/livebook/.env
|
||||
cd /opt/livebook || exit
|
||||
cd /opt/livebook
|
||||
$STD mix escript.install hex livebook --force
|
||||
|
||||
chown -R livebook:livebook /opt/livebook /data
|
||||
|
||||
@@ -60,7 +60,7 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "meilisearch-ui" "riccox/meilisearch-ui" "tarball"
|
||||
|
||||
msg_info "Configuring Meilisearch-UI"
|
||||
cd /opt/meilisearch-ui || exit
|
||||
cd /opt/meilisearch-ui
|
||||
sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
|
||||
mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local
|
||||
$STD pnpm install
|
||||
|
||||
@@ -122,7 +122,7 @@ function update_script() {
|
||||
|
||||
msg_info "Building Frontend"
|
||||
export NODE_OPTIONS="--max_old_space_size=2048 --openssl-legacy-provider"
|
||||
cd /opt/nginxproxymanager/frontend || exit
|
||||
cd /opt/nginxproxymanager/frontend
|
||||
# Replace node-sass with sass in package.json before installation
|
||||
sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json
|
||||
$STD yarn install --network-timeout 600000
|
||||
|
||||
@@ -49,7 +49,7 @@ function update_script() {
|
||||
msg_info "Updating VaultWarden to $VAULT (Patience)"
|
||||
cd ~ && rm -rf vaultwarden
|
||||
$STD git clone https://github.com/dani-garcia/vaultwarden
|
||||
cd vaultwarden || exit
|
||||
cd vaultwarden
|
||||
$STD cargo build --features "sqlite,mysql,postgresql" --release
|
||||
DIR=/usr/bin/vaultwarden
|
||||
if [ -d "$DIR" ]; then
|
||||
|
||||
@@ -34,7 +34,7 @@ function update_script() {
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
rm -rf /opt/vikunja/vikunja
|
||||
curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o $(basename "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb")
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -38,12 +38,12 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball"
|
||||
|
||||
msg_info "Updating Watcharr"
|
||||
cd /opt/watcharr || exit
|
||||
cd /opt/watcharr
|
||||
export GOOS=linux
|
||||
$STD npm i
|
||||
$STD npm run build
|
||||
mv ./build ./server/ui
|
||||
cd server || exit
|
||||
cd server
|
||||
$STD go mod download
|
||||
$STD go build -o ./watcharr
|
||||
msg_ok "Updated Watcharr"
|
||||
|
||||
@@ -38,7 +38,7 @@ function update_script() {
|
||||
curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$temp_file"
|
||||
tar xzf "$temp_file"
|
||||
cp -rf wger-"$RELEASE"/* /home/wger/src
|
||||
cd /home/wger/src || exit
|
||||
cd /home/wger/src
|
||||
$STD pip install -r requirements_prod.txt --ignore-installed
|
||||
$STD pip install -e .
|
||||
$STD python3 manage.py migrate
|
||||
|
||||
@@ -38,7 +38,7 @@ function update_script() {
|
||||
apt -y upgrade
|
||||
if [[ -d /etc/wgdashboard ]]; then
|
||||
sleep 2
|
||||
cd /etc/wgdashboard/src || exit
|
||||
cd /etc/wgdashboard/src
|
||||
./wgd.sh update
|
||||
./wgd.sh start
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
|
||||
|
||||
msg_info "Updating Wizarr"
|
||||
cd /opt/wizarr || exit
|
||||
cd /opt/wizarr
|
||||
$STD /usr/local/bin/uv sync --frozen
|
||||
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
|
||||
$STD npm --prefix app/static install
|
||||
|
||||
@@ -43,7 +43,7 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "zipline" "diced/zipline" "tarball"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
cd /opt/zipline || exit
|
||||
cd /opt/zipline
|
||||
mv /opt/.env /opt/zipline/.env
|
||||
$STD pnpm install
|
||||
$STD pnpm build
|
||||
|
||||
@@ -26,7 +26,7 @@ import_local_ip
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
|
||||
|
||||
msg_info "Setup 2FAuth"
|
||||
cd /opt/2fauth || exit
|
||||
cd /opt/2fauth
|
||||
cp .env.example .env
|
||||
sed -i -e "s|^APP_URL=.*|APP_URL=http://$LOCAL_IP|" \
|
||||
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
|
||||
|
||||
@@ -23,7 +23,7 @@ NODE_VERSION="22" setup_nodejs
|
||||
create_self_signed_cert
|
||||
|
||||
msg_info "Installing Actual Budget"
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
RELEASE=$(get_latest_github_release "actualbudget/actual")
|
||||
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
|
||||
chown -R root:root /opt/actualbudget-data
|
||||
@@ -50,7 +50,7 @@ cat <<EOF >/opt/actualbudget-data/config.json
|
||||
}
|
||||
EOF
|
||||
mkdir -p /opt/actualbudget
|
||||
cd /opt/actualbudget || exit
|
||||
cd /opt/actualbudget
|
||||
$STD npm install --location=global @actual-app/sync-server
|
||||
echo "${RELEASE}" >~/.actualbudget
|
||||
msg_ok "Installed Actual Budget"
|
||||
|
||||
@@ -55,7 +55,7 @@ msg_info "Setup Apache Guacamole"
|
||||
mkdir -p /etc/guacamole/{extensions,lib}
|
||||
RELEASE_SERVER=$(curl -fsSL https://api.github.com/repos/apache/guacamole-server/tags | jq -r '.[].name' | grep -v -- '-RC' | head -n 1)
|
||||
curl -fsSL "https://api.github.com/repos/apache/guacamole-server/tarball/refs/tags/${RELEASE_SERVER}" | tar -xz --strip-components=1 -C /opt/apache-guacamole/server
|
||||
cd /opt/apache-guacamole/server || exit
|
||||
cd /opt/apache-guacamole/server
|
||||
export CPPFLAGS="-Wno-error=deprecated-declarations"
|
||||
$STD autoreconf -fi
|
||||
$STD ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots --disable-guaclog
|
||||
@@ -64,7 +64,7 @@ $STD make install
|
||||
$STD ldconfig
|
||||
RELEASE_CLIENT=$(curl -fsSL https://api.github.com/repos/apache/guacamole-client/tags | jq -r '.[].name' | grep -v -- '-RC' | head -n 1)
|
||||
curl -fsSL "https://downloads.apache.org/guacamole/${RELEASE_CLIENT}/binary/guacamole-${RELEASE_CLIENT}.war" -o "/opt/apache-guacamole/tomcat9/webapps/guacamole.war"
|
||||
cd /root || exit
|
||||
cd /root
|
||||
curl -fsSL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.3.0.tar.gz" -o "/root/mysql-connector-j-9.3.0.tar.gz"
|
||||
$STD tar -xf ~/mysql-connector-j-9.3.0.tar.gz
|
||||
mv ~/mysql-connector-j-9.3.0/mysql-connector-j-9.3.0.jar /etc/guacamole/lib/
|
||||
@@ -87,7 +87,7 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/guacamole.creds
|
||||
cd guacamole-auth-jdbc-"${RELEASE_SERVER}"/mysql/schema || exit
|
||||
cd guacamole-auth-jdbc-"${RELEASE_SERVER}"/mysql/schema
|
||||
cat *.sql | mariadb -u root ${DB_NAME}
|
||||
{
|
||||
echo "mysql-hostname: 127.0.0.1"
|
||||
|
||||
@@ -40,7 +40,7 @@ msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Crafty-Controller (Patience)"
|
||||
useradd crafty -m -s /bin/bash
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
mkdir -p /opt/crafty-controller/crafty /opt/crafty-controller/server
|
||||
RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//')
|
||||
echo "${RELEASE}" >"/opt/crafty-controller_version.txt"
|
||||
@@ -49,7 +49,7 @@ $STD unzip crafty-4-v"${RELEASE}".zip
|
||||
cp -a crafty-4-v"${RELEASE}"/. /opt/crafty-controller/crafty/crafty-4/
|
||||
rm -rf crafty-4-v"${RELEASE}"
|
||||
|
||||
cd /opt/crafty-controller/crafty || exit
|
||||
cd /opt/crafty-controller/crafty
|
||||
python3 -m venv .venv
|
||||
chown -R crafty:crafty /opt/crafty-controller/
|
||||
$STD sudo -u crafty bash -c '
|
||||
|
||||
@@ -37,7 +37,7 @@ msg_ok "Installed Rust"
|
||||
|
||||
msg_info "Building Vaultwarden ${VAULT} (Patience)"
|
||||
$STD git clone https://github.com/dani-garcia/vaultwarden
|
||||
cd vaultwarden || exit
|
||||
cd vaultwarden
|
||||
$STD cargo build --features "sqlite,mysql,postgresql" --release
|
||||
msg_ok "Built Vaultwarden ${VAULT}"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ $STD apt install -y make
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Vikunja (Patience)"
|
||||
cd /opt || exit
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||
curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o vikunja-"$RELEASE"-amd64.deb
|
||||
$STD dpkg -i vikunja-"$RELEASE"-amd64.deb
|
||||
|
||||
@@ -18,7 +18,7 @@ PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="imagick,bz2,sqlite3" setup_php
|
||||
fetch_and_deploy_gh_release "wallos" "ellite/Wallos" "tarball"
|
||||
|
||||
msg_info "Installing Wallos (Patience)"
|
||||
cd /opt/wallos || exit
|
||||
cd /opt/wallos
|
||||
mv /opt/wallos/db/wallos.empty.db /opt/wallos/db/wallos.db
|
||||
chown -R www-data:www-data /opt/wallos
|
||||
chmod -R 755 /opt/wallos
|
||||
|
||||
@@ -22,11 +22,11 @@ NODE_VERSION="22" setup_nodejs
|
||||
fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball"
|
||||
|
||||
msg_info "Setup Watcharr"
|
||||
cd /opt/watcharr || exit
|
||||
cd /opt/watcharr
|
||||
$STD npm i
|
||||
$STD npm run build
|
||||
mv ./build ./server/ui
|
||||
cd server || exit
|
||||
cd server
|
||||
export CGO_ENABLED=1 GOOS=linux
|
||||
$STD go mod download
|
||||
$STD go build -o ./watcharr
|
||||
|
||||
@@ -36,12 +36,12 @@ chmod g+w /home/wger/db /home/wger/db/database.sqlite
|
||||
mkdir /home/wger/{static,media}
|
||||
chmod o+w /home/wger/media
|
||||
temp_dir=$(mktemp -d)
|
||||
cd "$temp_dir" || exit
|
||||
cd "$temp_dir"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$RELEASE.tar.gz"
|
||||
tar xzf "$RELEASE".tar.gz
|
||||
mv wger-"$RELEASE" /home/wger/src
|
||||
cd /home/wger/src || exit
|
||||
cd /home/wger/src
|
||||
$STD pip install -r requirements_prod.txt --ignore-installed
|
||||
$STD pip install -e .
|
||||
$STD wger create-settings --database-path /home/wger/db/database.sqlite
|
||||
|
||||
@@ -20,7 +20,7 @@ msg_ok "Installed Dependencies"
|
||||
msg_info "Installing Whisparr"
|
||||
mkdir -p /var/lib/whisparr/
|
||||
chmod 775 /var/lib/whisparr/
|
||||
cd /var/lib/whisparr/ || exit
|
||||
cd /var/lib/whisparr/
|
||||
$STD curl -fsSL 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' -o whisparr.tar.gz
|
||||
$STD tar -xvzf whisparr.tar.gz
|
||||
mv Whisparr /opt
|
||||
|
||||
@@ -28,7 +28,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
||||
|
||||
msg_info "Installing WGDashboard"
|
||||
cd /etc/wgdashboard/src || exit
|
||||
cd /etc/wgdashboard/src
|
||||
chmod u+x wgd.sh
|
||||
$STD ./wgd.sh install
|
||||
. /etc/os-release
|
||||
|
||||
@@ -22,7 +22,7 @@ SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')"
|
||||
echo "Zipline Secret Key: ${SECRET_KEY}" >>~/zipline.creds
|
||||
|
||||
msg_info "Installing Zipline (Patience)"
|
||||
cd /opt/zipline || exit
|
||||
cd /opt/zipline
|
||||
cat <<EOF >/opt/zipline/.env
|
||||
DATABASE_URL=postgres://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME
|
||||
CORE_SECRET=$SECRET_KEY
|
||||
|
||||
Reference in New Issue
Block a user