aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
index 5198659..0887d56 100644
--- a/shell.nix
+++ b/shell.nix
@@ -40,6 +40,28 @@ let
export ARCHIVES_DIR
#
+ # Reseting
+ #
+
+ pkill httpd >/dev/null 2>&1
+ pkill php-fpm >/dev/null 2>&1
+ pkill mysqld >/dev/null 2>&1
+
+ read -t 2 -p "Nuke .config and .archives? [y/N] " NUKE
+ NUKE="''${NUKE,,}"
+ if [ "$NUKE" == 'y' -o "$NUKE" == 'yes' ]
+ then
+ echo 'Removing .config and .archives...'
+ rm -r "$MYSQL_HOME" "$ROOT_DIR" "$ARCHIVES_DIR"
+ elif [ -z "$NUKE" ]
+ then
+ echo no
+ elif ! [ "$NUKE" == 'n' -o "$NUKE" == 'no' ]
+ then
+ printf "Unknown responce '$NUKE', not nuking!"
+ fi
+
+ #
# Apache2
#