turnoff

Place in /usr/local/bin with chmod 755 and root owner.
mail@pastecode.io avatar
unknown
sh
2 years ago
346 B
2
Indexable
Never
#!/bin/bash
# 14 Nov 20 / Katch
# (@)/turnoff
# Shorter way to halt/reboot

if [ $1 = "-p" ] ; then
	sudo openrc-shutdown -p now
elif [ $1 = "-r" ] ; then
	sudo openrc-shutdown -r now
elif [ $1 = "-R" ] ; then
	sudo openrc-shutdown -R
else
	echo "$1 is not an option."
	echo "Try <-r> for reboot, <-p> for poweroff, & <-R> to re-execute init."
fi