mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-22 13:35:15 +00:00
Refactor cleanup steps to use cleanup_lxc function
Replaces repeated manual cleanup commands with a single call to the cleanup_lxc function across all install scripts. This change improves maintainability and consistency by centralizing cleanup logic.
This commit is contained in:
@@ -119,7 +119,7 @@ curl -fsSL "$TOMCAT_URL" -o "/tmp/tomcat.tar.gz"
|
||||
mkdir -p /opt/tomcat-$TOMCAT_VERSION
|
||||
tar --strip-components=1 -xzf /tmp/tomcat.tar.gz -C /opt/tomcat-$TOMCAT_VERSION
|
||||
chown -R root:root /opt/tomcat-$TOMCAT_VERSION
|
||||
|
||||
rm -f /tmp/tomcat.tar.gz
|
||||
cat <<EOF >/etc/systemd/system/tomcat.service
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container
|
||||
@@ -147,9 +147,4 @@ msg_ok "Tomcat $LATEST_VERSION installed and started"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f /tmp/tomcat.tar.gz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
cleanup_lxc
|
||||
|
||||
Reference in New Issue
Block a user