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