From acbcf8a81f82e16208fbfafd680ed5d2ca8ff60f Mon Sep 17 00:00:00 2001 From: tomit4 Date: Wed, 15 Jun 2022 13:44:30 -0700 Subject: [PATCH] added if statement to shutdown.sh and reboot.sh that removes zsh_history on shutdown/reboot --- scripts/reboot.sh | 4 ++++ scripts/shutdown.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/reboot.sh b/scripts/reboot.sh index 60020ce8..1b852aa8 100755 --- a/scripts/reboot.sh +++ b/scripts/reboot.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ -f "$HOME/.zsh_history "] ; then + rm "$HOME/.zsh_history" +fi + if [ -d "$HOME/.recycle-bin" ] ; then doas rm -r "$HOME/.recycle-bin/" && doas reboot else diff --git a/scripts/shutdown.sh b/scripts/shutdown.sh index 338d3dc8..c0180ec3 100755 --- a/scripts/shutdown.sh +++ b/scripts/shutdown.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ -f "$HOME/.zsh_history "] ; then + rm "$HOME/.zsh_history" +fi + if [ -d "$HOME/.recycle-bin" ] ; then doas rm -r "$HOME/.recycle-bin/" && doas shutdown -h now else