Skip to content
Draft
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
10 changes: 2 additions & 8 deletions ct/alpine-cinny.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ function update_script() {
fi

if check_for_gh_release "cinny" "cinnyapp/cinny"; then
msg_info "Backing up Configuration"
cp /opt/cinny/config.json /opt/cinny_config.json.bak
msg_ok "Backed up Configuration"
create_backup /opt/cinny/config.json

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cinny" "cinnyapp/cinny" "prebuild" "latest" "/opt/cinny" "cinny-*.tar.gz"

msg_info "Restoring Configuration"
cp /opt/cinny_config.json.bak /opt/cinny/config.json
rm -f /opt/cinny_config.json.bak
msg_ok "Restored Configuration"
restore_backup

msg_info "Restarting nginx"
$STD rc-service nginx restart
Expand Down
6 changes: 2 additions & 4 deletions ct/alpine-garage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ function update_script() {
rc-service garage stop || true
msg_ok "Stopped Service"

msg_info "Backing Up Data"
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
create_backup /etc/garage.toml

msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage
clear_update_backup
msg_ok "Updated Garage"

msg_info "Starting Service"
Expand Down
10 changes: 2 additions & 8 deletions ct/alpine-ironclaw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,12 @@ function update_script() {
rc-service ironclaw stop 2>/dev/null || true
msg_ok "Stopped Service"

msg_info "Backing up Configuration"
cp /root/.ironclaw/.env /root/ironclaw.env.bak
msg_ok "Backed up Configuration"
create_backup /root/.ironclaw/.env

fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
chmod +x /usr/local/bin/ironclaw

msg_info "Restoring Configuration"
cp /root/ironclaw.env.bak /root/.ironclaw/.env
rm -f /root/ironclaw.env.bak
msg_ok "Restored Configuration"
restore_backup

msg_info "Starting Service"
rc-service ironclaw start
Expand Down
12 changes: 4 additions & 8 deletions ct/endurain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ function update_script() {
systemctl stop endurain
msg_ok "Stopped Service"

msg_info "Creating Backup"
cp /opt/endurain/.env /opt/endurain.env
cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
msg_ok "Created Backup"
create_backup /opt/endurain/.env
[[ -f /opt/endurain/frontend/app/dist/env.js ]] && cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js

CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"

Expand All @@ -47,16 +45,14 @@ function update_script() {
/opt/endurain/{docs,example.env,screenshot_01.png} \
/opt/endurain/docker* \
/opt/endurain/*.yml
cp /opt/endurain.env /opt/endurain/.env
rm /opt/endurain.env
restore_backup
msg_ok "Prepared Update"

msg_info "Updating Frontend"
cd /opt/endurain/frontend/app
$STD npm ci
$STD npm run build
cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js
rm /opt/endurain.env.js
[[ -f /opt/endurain.env.js ]] && cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js && rm -f /opt/endurain.env.js
msg_ok "Updated Frontend"

msg_info "Updating Backend"
Expand Down
14 changes: 2 additions & 12 deletions ct/ezbookkeeping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,11 @@ function update_script() {
systemctl stop ezbookkeeping
msg_ok "Stopped Service"

msg_info "Backing up configuration"
mkdir -p /opt/ezbookkeeping-backup
cp /opt/ezbookkeeping/conf/ezbookkeeping.ini /opt/ezbookkeeping-backup/
cp -r /opt/ezbookkeeping/data /opt/ezbookkeeping-backup/data/
cp -r /opt/ezbookkeeping/storage /opt/ezbookkeeping-backup/storage/
msg_ok "Backed up configuration"
create_backup /opt/ezbookkeeping/data /opt/ezbookkeeping/storage

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ezbookkeeping" "mayswind/ezbookkeeping" "prebuild" "latest" "/opt/ezbookkeeping" "ezbookkeeping-*-linux-$(arch_resolve).tar.gz"
restore_backup

msg_info "Restoring configuration"
cp -rf /opt/ezbookkeeping-backup/ezbookkeeping.ini /opt/ezbookkeeping/conf/
cp -rf /opt/ezbookkeeping-backup/data/. /opt/ezbookkeeping/data/
cp -rf /opt/ezbookkeeping-backup/storage/. /opt/ezbookkeeping/storage/
rm -rf /opt/ezbookkeeping-backup
msg_ok "Restored configuration"

msg_info "Starting Service"
systemctl start ezbookkeeping
Expand Down
5 changes: 3 additions & 2 deletions ct/fireshare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ function update_script() {
systemctl stop fireshare
msg_ok "Stopped Service"

mv /opt/fireshare/fireshare.env /opt
create_backup /opt/fireshare/fireshare.env

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "fireshare" "ShaneIsrael/fireshare" "tarball"
mv /opt/fireshare.env /opt/fireshare
restore_backup
rm -f /usr/local/bin/fireshare

msg_info "Updating Fireshare"
Expand Down
15 changes: 2 additions & 13 deletions ct/fladder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,10 @@ function update_script() {
systemctl stop nginx
msg_ok "Stopped Service"

if [[ -f /opt/fladder/assets/config/config.json ]]; then
msg_info "Backing up configuration"
cp /opt/fladder/assets/config/config.json /tmp/fladder_config.json.bak
msg_ok "Configuration backed up"
fi
create_backup /opt/fladder/assets/config/config.json

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Fladder" "DonutWare/Fladder" "prebuild" "latest" "/opt/fladder" "Fladder-Web-*.zip"

if [[ -f /tmp/fladder_config.json.bak ]]; then
msg_info "Restoring configuration"
mkdir -p /opt/fladder/assets/config
cp /tmp/fladder_config.json.bak /opt/fladder/assets/config/config.json
rm -f /tmp/fladder_config.json.bak
msg_ok "Configuration restored"
fi
restore_backup

msg_info "Starting Service"
systemctl start nginx
Expand Down
12 changes: 2 additions & 10 deletions ct/flatnotes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ function update_script() {
systemctl stop flatnotes
msg_ok "Stopped Service"

msg_info "Backing up Configuration and Data"
cp /opt/flatnotes/.env /opt/flatnotes.env
cp -r /opt/flatnotes/data /opt/flatnotes_data_backup
msg_ok "Backed up Configuration and Data"
create_backup /opt/flatnotes/data

fetch_and_deploy_gh_release "flatnotes" "dullage/flatnotes" "tarball"
restore_backup

msg_info "Updating Flatnotes"
cd /opt/flatnotes/client
Expand All @@ -52,12 +50,6 @@ function update_script() {
$STD /usr/local/bin/uv sync
msg_ok "Updated Flatnotes"

msg_info "Restoring Configuration and Data"
cp /opt/flatnotes.env /opt/flatnotes/.env
cp -r /opt/flatnotes_data_backup/. /opt/flatnotes/data
rm -f /opt/flatnotes.env
rm -r /opt/flatnotes_data_backup
msg_ok "Restored Configuration and Data"

msg_info "Starting Service"
systemctl start flatnotes
Expand Down
16 changes: 2 additions & 14 deletions ct/freshrss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,11 @@ function update_script() {
systemctl stop apache2
msg_ok "Stopped Apache2"

msg_info "Backing up FreshRSS"
mv /opt/freshrss /opt/freshrss-backup
msg_ok "Backup Created"
create_backup /opt/freshrss /opt/freshrss/data /opt/freshrss/extensions

fetch_and_deploy_gh_release "freshrss" "FreshRSS/FreshRSS" "tarball"
restore_backup

msg_info "Restoring data and configuration"
if [[ -d /opt/freshrss-backup/data ]]; then
cp -a /opt/freshrss-backup/data/. /opt/freshrss/data/
fi
if [[ -d /opt/freshrss-backup/extensions ]]; then
cp -a /opt/freshrss-backup/extensions/. /opt/freshrss/extensions/
fi
msg_ok "Data Restored"

msg_info "Setting permissions"
chown -R www-data:www-data /opt/freshrss
Expand All @@ -66,9 +57,6 @@ function update_script() {
systemctl start apache2
msg_ok "Started Apache2"

msg_info "Cleaning up backup"
rm -rf /opt/freshrss-backup
msg_ok "Cleaned up backup"
msg_ok "Updated successfully!"
fi
exit
Expand Down
6 changes: 2 additions & 4 deletions ct/garage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ function update_script() {
systemctl stop garage
msg_ok "Stopped Service"

msg_info "Backing Up Data"
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
create_backup /etc/garage.toml

msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/x86_64-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage
clear_update_backup
msg_ok "Updated Garage"

msg_info "Starting Service"
Expand Down
5 changes: 3 additions & 2 deletions ct/gatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ function update_script() {
systemctl stop gatus
msg_ok "Stopped Service"

mv /opt/gatus/config/config.yaml /opt
create_backup /opt/gatus/config/config.yaml

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gatus" "TwiN/gatus" "tarball"
restore_backup

msg_info "Updating Gatus"
cd /opt/gatus
$STD go mod tidy
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
setcap CAP_NET_RAW+ep gatus
mv /opt/config.yaml config
msg_ok "Updated Gatus"

msg_info "Starting Service"
Expand Down
11 changes: 2 additions & 9 deletions ct/ghostfolio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,12 @@ function update_script() {
systemctl stop ghostfolio
msg_ok "Stopped Service"

msg_info "Creating Backup"
tar -czf "/opt/ghostfolio_backup_$(date +%F).tar.gz" \
-C /opt \
--exclude="ghostfolio/node_modules" \
--exclude="ghostfolio/dist" \
ghostfolio
mv /opt/ghostfolio/.env /opt/env.backup
msg_ok "Backup Created"
create_backup /opt/ghostfolio/.env

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ghostfolio" "ghostfolio/ghostfolio" "tarball" "latest" "/opt/ghostfolio"
restore_backup

msg_info "Updating Ghostfolio"
mv /opt/env.backup /opt/ghostfolio/.env
sed -i -E '/^DATABASE_URL=/ s/[?&]sslmode=prefer//g' /opt/ghostfolio/.env
cd /opt/ghostfolio
$STD npm ci
Expand Down
15 changes: 2 additions & 13 deletions ct/github-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,11 @@ function update_script() {
systemctl stop actions-runner
msg_ok "Stopped Service"

msg_info "Backing up runner configuration"
BACKUP_DIR="/opt/actions-runner.backup"
mkdir -p "$BACKUP_DIR"
for f in .runner .credentials .credentials_rsaparams .env .path; do
[[ -f /opt/actions-runner/$f ]] && cp -a /opt/actions-runner/$f "$BACKUP_DIR/"
done
msg_ok "Backed up configuration"
create_backup /opt/actions-runner/$f

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz"
restore_backup

msg_info "Restoring runner configuration"
for f in .runner .credentials .credentials_rsaparams .env .path; do
[[ -f "$BACKUP_DIR/$f" ]] && cp -a "$BACKUP_DIR/$f" /opt/actions-runner/
done
rm -rf "$BACKUP_DIR"
msg_ok "Restored configuration"

msg_info "Starting Service"
systemctl start actions-runner
Expand Down
11 changes: 2 additions & 9 deletions ct/gogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,11 @@ function update_script() {
systemctl stop gogs
msg_ok "Stopped Service"

msg_info "Backing up Data"
cp -r /opt/gogs/custom /opt/gogs_custom_backup
cp -r /opt/gogs/data /opt/gogs_data_backup
msg_ok "Backed up Data"
create_backup /opt/gogs/custom /opt/gogs/data

CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gogs" "gogs/gogs" "prebuild" "latest" "/opt/gogs" "gogs_*_linux_amd64.tar.gz"
restore_backup

msg_info "Restoring Data"
cp -r /opt/gogs_custom_backup/. /opt/gogs/custom
cp -r /opt/gogs_data_backup/. /opt/gogs/data
rm -rf /opt/gogs_custom_backup /opt/gogs_data_backup
msg_ok "Restored Data"

msg_info "Starting Service"
systemctl start gogs
Expand Down
12 changes: 2 additions & 10 deletions ct/grist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,13 @@ function update_script() {
systemctl stop grist
msg_ok "Stopped Service"

msg_info "Creating backup"
rm -rf /opt/grist_bak
mv /opt/grist /opt/grist_bak
msg_ok "Backup created"
create_backup /opt/grist/.env /opt/grist/docs /opt/grist/grist-sessions.db /opt/grist/landing.db

fetch_and_deploy_gh_release "grist" "gristlabs/grist-core" "tarball"
restore_backup

msg_info "Updating Grist"
mkdir -p /opt/grist/docs
cp -n /opt/grist_bak/.env /opt/grist/.env
if ls /opt/grist_bak/docs/* &>/dev/null; then
cp -r /opt/grist_bak/docs/* /opt/grist/docs/
fi
[[ -f /opt/grist_bak/grist-sessions.db ]] && cp /opt/grist_bak/grist-sessions.db /opt/grist/grist-sessions.db
[[ -f /opt/grist_bak/landing.db ]] && cp /opt/grist_bak/landing.db /opt/grist/landing.db
cd /opt/grist
$STD yarn install
$STD yarn run build:prod
Expand Down
16 changes: 2 additions & 14 deletions ct/guardian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,10 @@ function update_script() {
systemctl stop guardian-backend guardian-frontend
msg_ok "Stopped Services"

if [[ -f "/opt/guardian/backend/plex-guard.db" ]]; then
msg_info "Backing up Database"
cp "/opt/guardian/backend/plex-guard.db" "/tmp/plex-guard.db.backup"
msg_ok "Backed up Database"
fi
create_backup /opt/guardian/.env /opt/guardian/backend/plex-guard.db

[[ -f "/opt/guardian/.env" ]] && cp "/opt/guardian/.env" "/opt"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian"
[[ -f "/opt/.env" ]] && mv "/opt/.env" "/opt/guardian"

if [[ -f "/tmp/plex-guard.db.backup" ]]; then
msg_info "Restoring Database"
cp "/tmp/plex-guard.db.backup" "/opt/guardian/backend/plex-guard.db"
rm "/tmp/plex-guard.db.backup"
msg_ok "Restored Database"
fi
restore_backup

msg_info "Updating Guardian"
cd /opt/guardian/backend
Expand Down
6 changes: 2 additions & 4 deletions ct/healthchecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ function update_script() {
systemctl stop healthchecks
msg_ok "Stopped Services"

msg_info "Backing up existing installation"
BACKUP="/opt/healthchecks-backup-$(date +%F-%H%M)"
cp -a /opt/healthchecks "$BACKUP"
msg_ok "Backup created at $BACKUP"
create_backup /opt/healthchecks

fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball"
restore_backup

cd /opt/healthchecks
if [[ -d venv ]]; then
Expand Down
Loading
Loading