diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-09-24 00:38:06 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-09-27 02:09:10 +0300 |
commit | cde18420186c3ebf2fc2c10997a043eceb521960 (patch) | |
tree | 54a5e0fd61b78d3eef3e8c255cc9d2eb3eb7408f | |
parent | 192a9fcc506f83414889094a602b150e475a3141 (diff) |
remove cleanup step from extras. Make it optional
33 files changed, 1 insertions, 112 deletions
diff --git a/buildlib.sh b/buildlib.sh index 8fc484d3..877e6b1c 100644 --- a/buildlib.sh +++ b/buildlib.sh @@ -103,7 +103,7 @@ function launch_installation_qemu() { local IP=$1 [[ "$NO_CFG_STEP" != "1" ]] && local CFG_STEP=configure - [[ "$NO_CLEANUP" != "1" ]] && local CLEANUP_STEP=cleanup + [[ "$NO_CLEANUP" != "1" ]] && local CLEANUP_STEP="[[ \$( type -t cleanup ) == function ]] && cleanup" [[ "$NO_HALT_STEP" != "1" ]] && local HALT_STEP="nohup halt &>/dev/null &" local INSTALLATION_STEPS=" install diff --git a/etc/nextcloudpi-config.d/NFS.sh b/etc/nextcloudpi-config.d/NFS.sh index e76c78c0..eff08d2e 100644 --- a/etc/nextcloudpi-config.d/NFS.sh +++ b/etc/nextcloudpi-config.d/NFS.sh @@ -95,13 +95,6 @@ EOF echo -e "NFS enabled" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/dnsmasq.sh b/etc/nextcloudpi-config.d/dnsmasq.sh index 47bbe6fe..145ebc48 100644 --- a/etc/nextcloudpi-config.d/dnsmasq.sh +++ b/etc/nextcloudpi-config.d/dnsmasq.sh @@ -79,13 +79,6 @@ EOF sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://$DOMAIN_ } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/fail2ban.sh b/etc/nextcloudpi-config.d/fail2ban.sh index 53dd186d..e055761f 100644 --- a/etc/nextcloudpi-config.d/fail2ban.sh +++ b/etc/nextcloudpi-config.d/fail2ban.sh @@ -149,13 +149,6 @@ EOF echo "fail2ban enabled" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/freeDNS.sh b/etc/nextcloudpi-config.d/freeDNS.sh index 60189220..a884d1ad 100644 --- a/etc/nextcloudpi-config.d/freeDNS.sh +++ b/etc/nextcloudpi-config.d/freeDNS.sh @@ -89,14 +89,6 @@ EOF echo "FreeDNS client is enabled" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/letsencrypt.sh b/etc/nextcloudpi-config.d/letsencrypt.sh index 65820d7e..d9bc8519 100644 --- a/etc/nextcloudpi-config.d/letsencrypt.sh +++ b/etc/nextcloudpi-config.d/letsencrypt.sh @@ -79,13 +79,6 @@ configure() rm -rf $NCDIR/.well-known } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/modsecurity.sh b/etc/nextcloudpi-config.d/modsecurity.sh index af78247d..6c876621 100644 --- a/etc/nextcloudpi-config.d/modsecurity.sh +++ b/etc/nextcloudpi-config.d/modsecurity.sh @@ -104,13 +104,6 @@ EOF bash -c "sleep 2 && systemctl restart apache2" &>/dev/null & } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-automount.sh b/etc/nextcloudpi-config.d/nc-automount.sh index 661e5991..4ae711ab 100644 --- a/etc/nextcloudpi-config.d/nc-automount.sh +++ b/etc/nextcloudpi-config.d/nc-automount.sh @@ -120,14 +120,6 @@ configure() echo "automount enabled" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh b/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh index fef6b7aa..e7fdbc5c 100644 --- a/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh +++ b/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh @@ -39,7 +39,6 @@ EOF } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-backup-auto.sh b/etc/nextcloudpi-config.d/nc-backup-auto.sh index 9d82925d..dc4a0467 100644 --- a/etc/nextcloudpi-config.d/nc-backup-auto.sh +++ b/etc/nextcloudpi-config.d/nc-backup-auto.sh @@ -126,8 +126,6 @@ EOF echo "automatic backups enabled" } -cleanup() { :; } - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-backup.sh b/etc/nextcloudpi-config.d/nc-backup.sh index 8b95e53b..2de1591d 100644 --- a/etc/nextcloudpi-config.d/nc-backup.sh +++ b/etc/nextcloudpi-config.d/nc-backup.sh @@ -78,7 +78,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-database.sh b/etc/nextcloudpi-config.d/nc-database.sh index 63553a09..238a4d07 100644 --- a/etc/nextcloudpi-config.d/nc-database.sh +++ b/etc/nextcloudpi-config.d/nc-database.sh @@ -67,7 +67,6 @@ configure() } install(){ :; } -cleanup(){ :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-datadir.sh b/etc/nextcloudpi-config.d/nc-datadir.sh index c84393bc..102dd926 100644 --- a/etc/nextcloudpi-config.d/nc-datadir.sh +++ b/etc/nextcloudpi-config.d/nc-datadir.sh @@ -76,7 +76,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-fix-permissions.sh b/etc/nextcloudpi-config.d/nc-fix-permissions.sh index 1252ad8e..9aa9f1ea 100644 --- a/etc/nextcloudpi-config.d/nc-fix-permissions.sh +++ b/etc/nextcloudpi-config.d/nc-fix-permissions.sh @@ -29,7 +29,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-format-USB.sh b/etc/nextcloudpi-config.d/nc-format-USB.sh index 66f333e2..16b2bbe0 100644 --- a/etc/nextcloudpi-config.d/nc-format-USB.sh +++ b/etc/nextcloudpi-config.d/nc-format-USB.sh @@ -51,7 +51,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-forward-ports.sh b/etc/nextcloudpi-config.d/nc-forward-ports.sh index 480fc652..55172654 100644 --- a/etc/nextcloudpi-config.d/nc-forward-ports.sh +++ b/etc/nextcloudpi-config.d/nc-forward-ports.sh @@ -41,13 +41,6 @@ configure() upnpc -a "$IP" 80 "$HTTPPORT_" TCP } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-httpsonly.sh b/etc/nextcloudpi-config.d/nc-httpsonly.sh index d1fe9ffb..5d626704 100644 --- a/etc/nextcloudpi-config.d/nc-httpsonly.sh +++ b/etc/nextcloudpi-config.d/nc-httpsonly.sh @@ -28,7 +28,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-init.sh b/etc/nextcloudpi-config.d/nc-init.sh index 9692f6a6..aae4ef8b 100644 --- a/etc/nextcloudpi-config.d/nc-init.sh +++ b/etc/nextcloudpi-config.d/nc-init.sh @@ -88,7 +88,6 @@ EOF } install(){ :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-limits.sh b/etc/nextcloudpi-config.d/nc-limits.sh index 50292f2c..e4332520 100644 --- a/etc/nextcloudpi-config.d/nc-limits.sh +++ b/etc/nextcloudpi-config.d/nc-limits.sh @@ -26,7 +26,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-nextcloud.sh b/etc/nextcloudpi-config.d/nc-nextcloud.sh index eb38e1e7..df7f5ffe 100644 --- a/etc/nextcloudpi-config.d/nc-nextcloud.sh +++ b/etc/nextcloudpi-config.d/nc-nextcloud.sh @@ -178,8 +178,6 @@ EOF echo "Don't forget to run nc-init" } -cleanup(){ :; } - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-notify-updates.sh b/etc/nextcloudpi-config.d/nc-notify-updates.sh index 5ebd90c4..e85912ca 100644 --- a/etc/nextcloudpi-config.d/nc-notify-updates.sh +++ b/etc/nextcloudpi-config.d/nc-notify-updates.sh @@ -132,8 +132,6 @@ EOF echo "update web notifications enabled" } -cleanup() { :; } - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-ramlogs.sh b/etc/nextcloudpi-config.d/nc-ramlogs.sh index 0138897b..56296589 100644 --- a/etc/nextcloudpi-config.d/nc-ramlogs.sh +++ b/etc/nextcloudpi-config.d/nc-ramlogs.sh @@ -45,7 +45,6 @@ EOF } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-restore.sh b/etc/nextcloudpi-config.d/nc-restore.sh index d7a9702b..9c2b2fb6 100644 --- a/etc/nextcloudpi-config.d/nc-restore.sh +++ b/etc/nextcloudpi-config.d/nc-restore.sh @@ -109,7 +109,6 @@ EOF } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-scan-auto.sh b/etc/nextcloudpi-config.d/nc-scan-auto.sh index a1210085..f5cca603 100644 --- a/etc/nextcloudpi-config.d/nc-scan-auto.sh +++ b/etc/nextcloudpi-config.d/nc-scan-auto.sh @@ -65,8 +65,6 @@ EOF echo "automatic scans enabled" } -cleanup() { :; } - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-scan.sh b/etc/nextcloudpi-config.d/nc-scan.sh index 5bf236cb..0e30cc25 100644 --- a/etc/nextcloudpi-config.d/nc-scan.sh +++ b/etc/nextcloudpi-config.d/nc-scan.sh @@ -30,8 +30,6 @@ configure() /usr/local/bin/ncp-scan } -cleanup() { :; } - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/nc-static-IP.sh b/etc/nextcloudpi-config.d/nc-static-IP.sh index 9babd878..e15d11fd 100644 --- a/etc/nextcloudpi-config.d/nc-static-IP.sh +++ b/etc/nextcloudpi-config.d/nc-static-IP.sh @@ -51,7 +51,6 @@ EOF } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-swapfile.sh b/etc/nextcloudpi-config.d/nc-swapfile.sh index 1e5a66bf..cd0a23fb 100644 --- a/etc/nextcloudpi-config.d/nc-swapfile.sh +++ b/etc/nextcloudpi-config.d/nc-swapfile.sh @@ -44,7 +44,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-update.sh b/etc/nextcloudpi-config.d/nc-update.sh index 3addbe62..13204ba9 100644 --- a/etc/nextcloudpi-config.d/nc-update.sh +++ b/etc/nextcloudpi-config.d/nc-update.sh @@ -22,7 +22,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-webui.sh b/etc/nextcloudpi-config.d/nc-webui.sh index f1c2ef9b..68864d18 100644 --- a/etc/nextcloudpi-config.d/nc-webui.sh +++ b/etc/nextcloudpi-config.d/nc-webui.sh @@ -31,7 +31,6 @@ configure() } install() { :; } -cleanup() { :; } # License # diff --git a/etc/nextcloudpi-config.d/nc-wifi.sh b/etc/nextcloudpi-config.d/nc-wifi.sh index cd6e0380..3203aafc 100644 --- a/etc/nextcloudpi-config.d/nc-wifi.sh +++ b/etc/nextcloudpi-config.d/nc-wifi.sh @@ -66,13 +66,6 @@ configure() systemctl start nextcloud-domain } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/no-ip.sh b/etc/nextcloudpi-config.d/no-ip.sh index 0d4a421b..b333492b 100644 --- a/etc/nextcloudpi-config.d/no-ip.sh +++ b/etc/nextcloudpi-config.d/no-ip.sh @@ -97,13 +97,6 @@ configure() sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://"$DOMAIN_" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/samba.sh b/etc/nextcloudpi-config.d/samba.sh index 4e4c4e84..e0ffb4ac 100644 --- a/etc/nextcloudpi-config.d/samba.sh +++ b/etc/nextcloudpi-config.d/samba.sh @@ -81,13 +81,6 @@ EOF echo "SMB enabled" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it diff --git a/etc/nextcloudpi-config.d/unattended-upgrades.sh b/etc/nextcloudpi-config.d/unattended-upgrades.sh index 75320388..6348289c 100644 --- a/etc/nextcloudpi-config.d/unattended-upgrades.sh +++ b/etc/nextcloudpi-config.d/unattended-upgrades.sh @@ -45,13 +45,6 @@ EOF echo "Unattended upgrades active: $ACTIVE_ (autoreboot $AUTOREBOOT_)" } -cleanup() -{ - apt-get autoremove -y - apt-get clean - rm /var/lib/apt/lists/* -r -} - # License # # This script is free software; you can redistribute it and/or modify it |