Skip to content

Commit 9777abe

Browse files
authored
Remove redundant cleanup steps from update scripts (#9359)
1 parent fae0552 commit 9777abe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+188
-395
lines changed

ct/2fauth.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ function update_script() {
5757
$STD composer install --no-dev --prefer-dist
5858
php artisan 2fauth:install
5959
$STD systemctl restart nginx
60-
61-
msg_info "Cleaning Up"
62-
if dpkg -l | grep -q 'php8.2'; then
63-
$STD apt remove --purge -y php8.2*
64-
fi
65-
$STD apt -y autoremove
66-
$STD apt -y autoclean
67-
$STD apt -y clean
68-
msg_ok "Cleanup Completed"
6960
msg_ok "Updated successfully!"
7061
fi
7162
exit

ct/adventurelog.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ function update_script() {
6262
cd /opt/adventurelog/frontend || exit
6363
$STD pnpm i
6464
$STD pnpm build
65+
rm -rf /opt/adventurelog-backup
6566
msg_ok "Updated ${APP}"
6667

6768
msg_info "Starting Services"
6869
systemctl daemon-reexec
6970
systemctl start adventurelog-backend
7071
systemctl start adventurelog-frontend
7172
msg_ok "Services Started"
72-
73-
msg_info "Cleaning Up"
74-
rm -rf /opt/adventurelog-backup
75-
msg_ok "Cleaned"
7673
msg_ok "Updated successfully!"
7774
fi
7875
exit

ct/apache-tika.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ function update_script() {
3838
curl -fsSL -o tika-server-standard-${RELEASE}.jar "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar"
3939
mv --force tika-server-standard.jar tika-server-standard-prev-version.jar
4040
mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar
41+
rm -rf /opt/apache-tika/tika-server-standard-prev-version.jar
4142
echo "${RELEASE}" >/opt/${APP}_version.txt
4243
msg_ok "Updated ${APP} to v${RELEASE}"
4344

4445
msg_info "Starting Service"
4546
systemctl start apache-tika
4647
msg_ok "Started Service"
47-
msg_info "Cleaning Up"
48-
rm -rf /opt/apache-tika/tika-server-standard-prev-version.jar
49-
msg_ok "Cleanup Completed"
5048
msg_ok "Updated successfully!"
5149
else
5250
msg_ok "No update required. ${APP} is already at v${RELEASE}"

ct/authelia.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,11 @@ function update_script() {
3131
fi
3232

3333
if check_for_gh_release "authelia" "authelia/authelia"; then
34-
$STD apt-get update
35-
$STD apt-get -y upgrade
34+
$STD apt update
35+
$STD apt -y upgrade
3636

3737
fetch_and_deploy_gh_release "authelia" "authelia/authelia" "binary"
3838

39-
msg_info "Cleaning Up"
40-
$STD apt-get -y autoremove
41-
$STD apt-get -y autoclean
42-
msg_ok "Cleanup Completed"
4339
msg_ok "Updated successfully!"
4440
fi
4541
exit

ct/backrest.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,13 @@ function update_script() {
3939
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "$temp_file"
4040
tar xzf $temp_file -C /opt/backrest/bin
4141
chmod +x /opt/backrest/bin/backrest
42+
rm -f "$temp_file"
4243
echo "${RELEASE}" >/opt/${APP}_version.txt
4344
msg_ok "Updated ${APP} to ${RELEASE}"
4445

4546
msg_info "Starting Service"
4647
systemctl start backrest
4748
msg_ok "Started Service"
48-
49-
msg_info "Cleaning up"
50-
rm -f "$temp_file"
51-
msg_ok "Cleaned up"
5249
msg_ok "Updated successfully!"
5350
else
5451
msg_ok "No update required. ${APP} is already at ${RELEASE}"

ct/baikal.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,12 @@ function update_script() {
4747
chmod -R 755 /opt/baikal/
4848
cd /opt/baikal
4949
$STD composer install
50+
rm -rf /opt/baikal-backup
5051
msg_ok "Configured Baikal"
5152

5253
msg_info "Starting Service"
5354
systemctl start apache2
5455
msg_ok "Started Service"
55-
56-
msg_info "Cleaning up"
57-
rm -rf /opt/baikal-backup
58-
msg_ok "Cleaned"
5956
msg_ok "Updated successfully!"
6057
fi
6158
exit

ct/bar-assistant.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,12 @@ function update_script() {
5454
$STD php artisan route:cache
5555
$STD php artisan event:cache
5656
chown -R www-data:www-data /opt/bar-assistant
57+
rm -rf /opt/bar-assistant-backup
5758
msg_ok "Updated Bar-Assistant"
5859

5960
msg_info "Starting nginx"
6061
systemctl start nginx
6162
msg_ok "Started nginx"
62-
63-
msg_info "Cleaning up"
64-
rm -rf /opt/bar-assistant-backup
65-
msg_ok "Cleaned"
6663
fi
6764

6865
if check_for_gh_release "vue-salt-rim" "karlomikus/vue-salt-rim"; then
@@ -81,15 +78,12 @@ function update_script() {
8178
cd /opt/vue-salt-rim
8279
$STD npm install
8380
$STD npm run build
81+
rm -rf /opt/vue-salt-rim-backup
8482
msg_ok "Updated Vue Salt Rim"
8583

8684
msg_info "Starting nginx"
8785
systemctl start nginx
8886
msg_ok "Started nginx"
89-
90-
msg_info "Cleaning up"
91-
rm -rf /opt/vue-salt-rim-backup
92-
msg_ok "Cleaned"
9387
fi
9488

9589
if check_for_gh_release "meilisearch" "meilisearch/meilisearch"; then

ct/bookstack.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,12 @@ function update_script() {
5757
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
5858
chmod -R 775 /opt/bookstack/storage /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads
5959
chmod -R 640 /opt/bookstack/.env
60+
rm -rf /opt/bookstack-backup
6061
msg_ok "Configured BookStack"
6162

6263
msg_info "Starting Apache2"
6364
systemctl start apache2
6465
msg_ok "Started Apache2"
65-
66-
msg_info "Cleaning Up"
67-
rm -rf /opt/bookstack-backup
68-
msg_ok "Cleaned"
6966
msg_ok "Updated successfully!"
7067
fi
7168
exit

ct/dispatcharr.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function update_script() {
109109
fi
110110
$STD uv run python manage.py migrate --noinput
111111
$STD uv run python manage.py collectstatic --noinput
112+
rm -f /tmp/dispatcharr_db_*.sql
112113
msg_ok "Migrations Complete"
113114

114115
msg_info "Starting Services"
@@ -117,10 +118,6 @@ function update_script() {
117118
systemctl start dispatcharr-celerybeat
118119
systemctl start dispatcharr-daphne
119120
msg_ok "Started Services"
120-
121-
msg_info "Cleaning up"
122-
rm -f /tmp/dispatcharr_db_*.sql
123-
msg_ok "Cleanup completed"
124121
msg_ok "Updated successfully!"
125122
fi
126123
exit

ct/docker.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ function update_script() {
7676
portainer/agent
7777
msg_ok "Updated Portainer Agent"
7878
fi
79-
80-
msg_info "Cleaning up"
81-
$STD apt-get -y autoremove
82-
$STD apt-get -y autoclean
83-
msg_ok "Cleanup complete"
8479
msg_ok "Updated successfully!"
8580
exit
8681
}

0 commit comments

Comments
 (0)