From 3dfea7882ed15e5b3ba95b20b2a81a37668536fe Mon Sep 17 00:00:00 2001 From: Cody Cook Date: Wed, 18 Oct 2017 10:05:44 -0700 Subject: [PATCH] Install script should not try to remove bash or sh when cleaning up. Old script assumed you would do wget and run, but this allows for curl to --- rr4360psu_install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rr4360psu_install.sh b/rr4360psu_install.sh index cd8bce8..84f60e9 100755 --- a/rr4360psu_install.sh +++ b/rr4360psu_install.sh @@ -18,5 +18,9 @@ systemctl start rr4360psu.timer echo "Done" echo "Since this is freshly installed, running for the first time, then removing the installer." $script -rm "$0" -echo "Removed the installer and exiting the installation procedure. Cya!" \ No newline at end of file +if [ "$0" == "bash" ] || [ "$0" == "sh" ]; then + echo "Script ran from STDOUT, cannot remove installer." + echo "Exiting the installation procedure. Cya!" +else + rm "$0" && echo "Removed the installer and exiting the installation procedure. Cya!" +fi \ No newline at end of file