Skip to content

Commit afe3301

Browse files
authored
Refactor cleanup steps to use cleanup_lxc function (#9354)
1 parent 89198b0 commit afe3301

File tree

307 files changed

+522
-1971
lines changed

Some content is hidden

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

307 files changed

+522
-1971
lines changed

install/2fauth-install.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,4 @@ msg_ok "Configured Service"
9797

9898
motd_ssh
9999
customize
100-
101-
msg_info "Cleaning up"
102-
$STD apt -y autoremove
103-
$STD apt -y autoclean
104-
$STD apt -y clean
105-
msg_ok "Cleaned"
100+
cleanup_lxc

install/actualbudget-install.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,4 @@ msg_ok "Created Service"
8989

9090
motd_ssh
9191
customize
92-
93-
msg_info "Cleaning up"
94-
$STD apt -y autoremove
95-
$STD apt -y autoclean
96-
$STD apt -y clean
97-
msg_ok "Cleaned"
92+
cleanup_lxc

install/adguard-install.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,4 @@ msg_ok "Created Service"
4141

4242
motd_ssh
4343
customize
44-
45-
msg_info "Cleaning up"
46-
$STD apt -y autoremove
47-
$STD apt -y autoclean
48-
$STD apt -y clean
49-
msg_ok "Cleaned"
44+
cleanup_lxc

install/adventurelog-install.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,4 @@ msg_ok "Created Service"
146146

147147
motd_ssh
148148
customize
149-
150-
msg_info "Cleaning up"
151-
$STD apt -y autoremove
152-
$STD apt -y autoclean
153-
$STD apt -y clean
154-
msg_ok "Cleaned"
149+
cleanup_lxc

install/agentdvr-install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ curl -fsSL "$RELEASE" -o $(basename "$RELEASE")
3030
$STD unzip Agent_Linux64*.zip
3131
chmod +x ./Agent
3232
echo $RELEASE >~/.agentdvr
33+
rm -rf Agent_Linux64*.zip
3334
msg_ok "Installed AgentDVR"
3435

3536
msg_info "Creating Service"
@@ -53,10 +54,4 @@ msg_ok "Created Service"
5354

5455
motd_ssh
5556
customize
56-
57-
msg_info "Cleaning up"
58-
rm -rf Agent_Linux64*.zip
59-
$STD apt -y autoremove
60-
$STD apt -y autoclean
61-
$STD apt -y clean
62-
msg_ok "Cleaned"
57+
cleanup_lxc

install/apache-cassandra-install.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,4 @@ msg_ok "Installed Apache Cassandra"
3434

3535
motd_ssh
3636
customize
37-
38-
msg_info "Cleaning up"
39-
$STD apt-get -y autoremove
40-
$STD apt-get -y autoclean
41-
msg_ok "Cleaned"
37+
cleanup_lxc

install/apache-couchdb-install.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,4 @@ msg_ok "Installed Apache CouchDB."
3636

3737
motd_ssh
3838
customize
39-
40-
msg_info "Cleaning up"
41-
$STD apt-get -y autoremove
42-
$STD apt-get -y autoclean
43-
msg_ok "Cleaned"
39+
cleanup_lxc

install/apache-guacamole-install.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ mv ~/mysql-connector-j-9.3.0/mysql-connector-j-9.3.0.jar /etc/guacamole/lib/
7171
curl -fsSL "https://downloads.apache.org/guacamole/${RELEASE_SERVER}/binary/guacamole-auth-jdbc-${RELEASE_SERVER}.tar.gz" -o "/root/guacamole-auth-jdbc-${RELEASE_SERVER}.tar.gz"
7272
$STD tar -xf ~/guacamole-auth-jdbc-$RELEASE_SERVER.tar.gz
7373
mv ~/guacamole-auth-jdbc-$RELEASE_SERVER/mysql/guacamole-auth-jdbc-mysql-$RELEASE_SERVER.jar /etc/guacamole/extensions/
74+
rm -rf ~/mysql-connector-j-9.3.0{,.tar.gz}
75+
rm -rf ~/guacamole-auth-jdbc-$RELEASE_SERVER{,.tar.gz}
7476
msg_ok "Setup Apache Guacamole"
7577

7678
msg_info "Setup Database"
@@ -146,10 +148,4 @@ msg_ok "Setup Service"
146148

147149
motd_ssh
148150
customize
149-
150-
msg_info "Cleaning up"
151-
rm -rf ~/mysql-connector-j-9.3.0{,.tar.gz}
152-
rm -rf ~/guacamole-auth-jdbc-$RELEASE_SERVER{,.tar.gz}
153-
$STD apt -y autoremove
154-
$STD apt -y autoclean
155-
msg_ok "Cleaned"
151+
cleanup_lxc

install/apache-tika-install.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,4 @@ msg_ok "Created Service"
6969

7070
motd_ssh
7171
customize
72-
73-
msg_info "Cleaning up"
74-
$STD apt-get -y autoremove
75-
$STD apt-get -y autoclean
76-
msg_ok "Cleaned"
72+
cleanup_lxc

install/apache-tomcat-install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ curl -fsSL "$TOMCAT_URL" -o "/tmp/tomcat.tar.gz"
119119
mkdir -p /opt/tomcat-$TOMCAT_VERSION
120120
tar --strip-components=1 -xzf /tmp/tomcat.tar.gz -C /opt/tomcat-$TOMCAT_VERSION
121121
chown -R root:root /opt/tomcat-$TOMCAT_VERSION
122-
122+
rm -f /tmp/tomcat.tar.gz
123123
cat <<EOF >/etc/systemd/system/tomcat.service
124124
[Unit]
125125
Description=Apache Tomcat Web Application Container
@@ -147,9 +147,4 @@ msg_ok "Tomcat $LATEST_VERSION installed and started"
147147

148148
motd_ssh
149149
customize
150-
151-
msg_info "Cleaning up"
152-
rm -f /tmp/tomcat.tar.gz
153-
$STD apt-get -y autoremove
154-
$STD apt-get -y autoclean
155-
msg_ok "Cleaned"
150+
cleanup_lxc

0 commit comments

Comments
 (0)