Skip to content

Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) #2596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ct/2fauth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function update_script() {
if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then
msg_info "Updating $APP to ${RELEASE}"

apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade

# Creating Backup
msg_info "Creating Backup"
Expand All @@ -55,7 +55,7 @@ function update_script() {
chmod -R 755 "/opt/2fauth"

export COMPOSER_ALLOW_SUPERUSER=1
composer install --no-dev --prefer-source &>/dev/null
$STD composer install --no-dev --prefer-source

php artisan 2fauth:install

Expand Down
6 changes: 3 additions & 3 deletions ct/actualbudget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ function update_script() {
wget -q "https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz"

mv /opt/actualbudget /opt/actualbudget_bak
tar -xzf "v${RELEASE}.tar.gz" &>/dev/null
$STD tar -xzf "v${RELEASE}.tar.gz"
mv *ctual-server-* /opt/actualbudget

mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
for dir in server-files .migrate user-files migrations; do
if [[ -d /opt/actualbudget_bak/$dir ]]; then
mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ 2>/dev/null || true
mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ || true
fi
done
if [[ -f /opt/actualbudget-data/migrate/.migrations ]]; then
Expand All @@ -74,7 +74,7 @@ ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
EOF
fi
cd /opt/actualbudget
yarn install &>/dev/null
$STD yarn install
echo "${RELEASE}" > /opt/actualbudget_version.txt
msg_ok "Updated ${APP}"

Expand Down
12 changes: 6 additions & 6 deletions ct/adventurelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ function update_script() {
mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
mv /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
cd /opt/adventurelog/backend/server
pip install --upgrade pip &>/dev/null
pip install -r requirements.txt &>/dev/null
python3 manage.py collectstatic --noinput &>/dev/null
python3 manage.py migrate &>/dev/null
$STD pip install --upgrade pip
$STD pip install -r requirements.txt
$STD python3 manage.py collectstatic --noinput
$STD python3 manage.py migrate

mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
cd /opt/adventurelog/frontend
pnpm install &>/dev/null
pnpm run build &>/dev/null
$STD pnpm install
$STD pnpm run build
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP}"

Expand Down
2 changes: 1 addition & 1 deletion ct/alpine-it-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ ! -d /usr/share/nginx/html ]; then
fi

RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ] || [ ! -f /opt/${APP}_version.txt ]; then
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt" ] || [ ! -f /opt/${APP}_version.txt ]; then
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
msg_info "Updating ${APP} LXC"
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
Expand Down
4 changes: 2 additions & 2 deletions ct/apt-cacher-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function update_script() {
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
4 changes: 2 additions & 2 deletions ct/aria2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function update_script() {
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
10 changes: 5 additions & 5 deletions ct/authelia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ function update_script() {
RELEASE=$(curl -s https://api.github.com/repos/authelia/authelia/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(/usr/bin/authelia -v | awk '{print substr($3, 2, length($2)) }' )" ]]; then
msg_info "Updating $APP to ${RELEASE}"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
wget -q "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_amd64.deb"
dpkg -i "authelia_${RELEASE}_amd64.deb" &>/dev/null
$STD dpkg -i "authelia_${RELEASE}_amd64.deb"
msg_info "Cleaning Up"
rm -f "authelia_${RELEASE}_amd64.deb"
apt-get -y autoremove &>/dev/null
apt-get -y autoclean &>/dev/null
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleanup Completed"
msg_ok "Updated $APP to ${RELEASE}"
else
Expand Down
18 changes: 9 additions & 9 deletions ct/authentik.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ function update_script() {
tar -xzf authentik.tar.gz -C /opt/authentik --strip-components 1 --overwrite
rm -rf authentik.tar.gz
cd /opt/authentik/website
npm install &>/dev/null
npm run build-bundled &>/dev/null
$STD npm install
$STD npm run build-bundled
cd /opt/authentik/web
npm install &>/dev/null
npm run build &>/dev/null
$STD npm install
$STD npm run build
msg_ok "Built ${APP} website"

msg_info "Building ${APP} server"
Expand All @@ -56,15 +56,15 @@ function update_script() {

msg_info "Installing Python Dependencies"
cd /opt/authentik
poetry install --only=main --no-ansi --no-interaction --no-root &>/dev/null
poetry export --without-hashes --without-urls -f requirements.txt --output requirements.txt &>/dev/null
pip install --no-cache-dir -r requirements.txt &>/dev/null
pip install . &>/dev/null
$STD poetry install --only=main --no-ansi --no-interaction --no-root
$STD poetry export --without-hashes --without-urls -f requirements.txt --output requirements.txt
$STD pip install --no-cache-dir -r requirements.txt
$STD pip install .
msg_ok "Installed Python Dependencies"

msg_info "Updating ${APP} to v${RELEASE} (Patience)"
cp -r /opt/authentik/authentik/blueprints /opt/authentik/blueprints
bash /opt/authentik/lifecycle/ak migrate &>/dev/null
$STD bash /opt/authentik/lifecycle/ak migrate
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to v${RELEASE}"

Expand Down
4 changes: 2 additions & 2 deletions ct/bazarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function update_script() {
check_container_resources
if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
4 changes: 2 additions & 2 deletions ct/blocky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function update_script() {
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
10 changes: 5 additions & 5 deletions ct/bookstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ function update_script() {
unzip -q /opt/v${RELEASE}.zip -d /opt
mv /opt/BookStack-${RELEASE} /opt/bookstack
cp /opt/bookstack-backup/.env /opt/bookstack/.env
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ 2>/dev/null || true
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ 2>/dev/null || true
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ 2>/dev/null || true
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
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null
php artisan migrate --force &>/dev/null
$STD COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev
$STD php artisan migrate --force
chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
chmod -R 775 /opt/bookstack/storage /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads
Expand Down
4 changes: 2 additions & 2 deletions ct/caddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function update_script() {
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
4 changes: 2 additions & 2 deletions ct/calibre-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ function update_script() {
echo "${options[*]}"
)
echo $cps_options >/opt/calibre-web/options.txt
pip install --upgrade calibreweb[$cps_options] &>/dev/null
$STD pip install --upgrade calibreweb[$cps_options]
else
rm -rf /opt/calibre-web/options.txt
pip install --upgrade calibreweb &>/dev/null
$STD pip install --upgrade calibreweb
fi

msg_info "Starting ${APP}"
Expand Down
4 changes: 2 additions & 2 deletions ct/casaos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function update_script() {
exit
fi
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated ${APP} LXC"
exit
}
Expand Down
26 changes: 13 additions & 13 deletions ct/changedetection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ function update_script() {

if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then
msg_info "Installing Dependencies"
apt-get update
apt-get install -y libjpeg-dev
$STD apt-get update
$STD apt-get install -y libjpeg-dev
msg_ok "Updated Dependencies"
fi

msg_info "Updating ${APP}"
pip3 install changedetection.io --upgrade &>/dev/null
$STD pip3 install changedetection.io --upgrade
msg_ok "Updated ${APP}"

msg_info "Updating Playwright"
pip3 install playwright --upgrade &>/dev/null
$STD pip3 install playwright --upgrade
msg_ok "Updated Playwright"

if [[ -f /etc/systemd/system/browserless.service ]]; then
msg_info "Updating Browserless (Patience)"
git -C /opt/browserless/ fetch --all &>/dev/null
git -C /opt/browserless/ reset --hard origin/main &>/dev/null
npm update --prefix /opt/browserless &>/dev/null
/opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
$STD git -C /opt/browserless/ fetch --all
$STD git -C /opt/browserless/ reset --hard origin/main
$STD npm update --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
/opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
/opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null
npm run build --prefix /opt/browserless &>/dev/null
npm run build:function --prefix /opt/browserless &>/dev/null
npm prune production --prefix /opt/browserless &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit
$STD npm run build --prefix /opt/browserless
$STD npm run build:function --prefix /opt/browserless
$STD npm prune production --prefix /opt/browserless
systemctl restart browserless
msg_ok "Updated Browserless"
else
Expand Down
14 changes: 7 additions & 7 deletions ct/checkmk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ function update_script() {
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}"
omd stop monitoring &>/dev/null
omd cp monitoring monitoringbackup &>/dev/null
$STD omd stop monitoring
$STD omd cp monitoring monitoringbackup
wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb
apt-get install -y /opt/checkmk.deb &>/dev/null
omd --force -V ${RELEASE}.cre update --conflict=install monitoring &>/dev/null
omd start monitoring &>/dev/null
omd -f rm monitoringbackup &>/dev/null
omd cleanup &>/dev/null
$STD apt-get install -y /opt/checkmk.deb
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
$STD omd start monitoring
$STD omd -f rm monitoringbackup
$STD omd cleanup
rm -rf /opt/checkmk.deb
msg_ok "Updated ${APP} to v${RELEASE}"
else
Expand Down
4 changes: 2 additions & 2 deletions ct/cloudflared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function update_script() {
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}
Expand Down
32 changes: 16 additions & 16 deletions ct/cockpit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,48 @@ function update_script() {

if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated ${APP} LXC"
exit
fi
if [ "$UPD" == "2" ]; then
msg_info "Installing dependencies (patience)"
apt-get install -y attr &>/dev/null
apt-get install -y nfs-kernel-server &>/dev/null
apt-get install -y samba &>/dev/null
apt-get install -y samba-common-bin &>/dev/null
apt-get install -y winbind &>/dev/null
apt-get install -y gawk &>/dev/null
$STD apt-get install -y attr
$STD apt-get install -y nfs-kernel-server
$STD apt-get install -y samba
$STD apt-get install -y samba-common-bin
$STD apt-get install -y winbind
$STD apt-get install -y gawk
msg_ok "Installed dependencies"
msg_info "Installing Cockpit file sharing"
wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
dpkg -i cockpit-file-sharing_*focal_all.deb &>/dev/null
$STD dpkg -i cockpit-file-sharing_*focal_all.deb
rm cockpit-file-sharing_*focal_all.deb
msg_ok "Installed Cockpit file sharing"
exit
fi
if [ "$UPD" == "3" ]; then
msg_info "Installing dependencies (patience)"
apt-get install -y psmisc &>/dev/null
apt-get install -y samba &>/dev/null
apt-get install -y samba-common-bin &>/dev/null
$STD apt-get install -y psmisc
$STD apt-get install -y samba
$STD apt-get install -y samba-common-bin
msg_ok "Installed dependencies"
msg_info "Installing Cockpit identities"
wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
dpkg -i cockpit-identities_*focal_all.deb &>/dev/null
$STD dpkg -i cockpit-identities_*focal_all.deb
rm cockpit-identities_*focal_all.deb
msg_ok "Installed Cockpit identities"
exit
fi
if [ "$UPD" == "4" ]; then
msg_info "Installing dependencies"
apt-get install -y rsync &>/dev/null
apt-get install -y zip &>/dev/null
$STD apt-get install -y rsync
$STD apt-get install -y zip
msg_ok "Installed dependencies"
msg_info "Installing Cockpit navigator"
wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4)
dpkg -i cockpit-navigator_*focal_all.deb &>/dev/null
$STD dpkg -i cockpit-navigator_*focal_all.deb
rm cockpit-navigator_*focal_all.deb
msg_ok "Installed Cockpit navigator"
exit
Expand Down
Loading