Friday, 31 July 2015

Linux Remote Shutdown Script

#!/bin/bash
echo "Are you sure you want to shutdown Linux Server(yes/no):"
read state
if [ "$state" == "yes" ]; then
echo -e "\n"
echo -e "\t Going to shutdown Linux server"
echo "Enter root password"
shutdown -h now
exit
'
else
echo " Kindly make sure before going for a shutdown"
fi

No comments:

Post a Comment