diff options
| author | Syndamia <kamen@syndamia.com> | 2025-01-19 20:57:27 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-01-19 20:57:27 +0200 |
| commit | 54c83dedd51dbf1b8bd88d0acf216d617c6b1c12 (patch) | |
| tree | a85a2bf3d4483add97cfa7cfa1751c55bf784e9b /shell.nix | |
| parent | da156bc5f8735542bb5e351633b133339e8713e2 (diff) | |
| download | nowayforward_human-54c83dedd51dbf1b8bd88d0acf216d617c6b1c12.tar nowayforward_human-54c83dedd51dbf1b8bd88d0acf216d617c6b1c12.tar.gz nowayforward_human-54c83dedd51dbf1b8bd88d0acf216d617c6b1c12.zip | |
feat(shell.nix): Add recovery/resetting on launch
Diffstat (limited to 'shell.nix')
| -rw-r--r-- | shell.nix | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 # |
