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

This commit is contained in:
Cody Cook 2017-10-18 10:05:44 -07:00
commit 3dfea7882e

View file

@ -18,5 +18,9 @@ systemctl start rr4360psu.timer
echo "Done" echo "Done"
echo "Since this is freshly installed, running for the first time, then removing the installer." echo "Since this is freshly installed, running for the first time, then removing the installer."
$script $script
rm "$0" if [ "$0" == "bash" ] || [ "$0" == "sh" ]; then
echo "Removed the installer and exiting the installation procedure. Cya!" 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