summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/WipePackages.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/sbin/WipePackages.php')
-rwxr-xr-xusr/local/sbin/WipePackages.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/local/sbin/WipePackages.php b/usr/local/sbin/WipePackages.php
index d802521..44f24bf 100755
--- a/usr/local/sbin/WipePackages.php
+++ b/usr/local/sbin/WipePackages.php
@@ -30,7 +30,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-if(!function_exists("readline")) {
+if (!function_exists("readline")) {
echo "\nThis script requires the readline() libary which is not present on this system.";
echo "\n\nSorry, but we cannot continue.\n";
die("Need readline() library");
@@ -42,23 +42,23 @@ require("config.inc");
echo "\nThis script will wipe all installed packages off of your pfSense installation.\n";
$command = readline("\nAre you sure you would like to continue [y/N]? ");
-if(strtoupper($command) == "Y" || strtoupper($command) == "YES") {
+if (strtoupper($command) == "Y" || strtoupper($command) == "YES") {
$rmconfig = readline("\nWould you like to remove all package configuration information as well [y/N]? ");
echo "\n\nStarting package wipe... One moment please... ";
exec("cd /var/db/pkg/ && find . -exec 'pkg_delete {}' \; ");
exec("rm -rf /var/db/pkg/*");
-
- if(strtoupper($rmconfig) == "Y" || strtoupper($rmconfig) == "YES") {
+
+ if (strtoupper($rmconfig) == "Y" || strtoupper($rmconfig) == "YES") {
echo "\nRemoving pfSense package configuration information...";
- if($config['installedpackages']['package']) {
+ if ($config['installedpackages']['package']) {
unset($config['installedpackages']['package']);
write_config("Package wipe procedure completed.");
}
echo "\n";
}
-
+
echo "\npfSense package wipe procedure has completed.\n\n";
}
OpenPOWER on IntegriCloud