#!/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"
ssh root@your_ip_address '
shutdown -h now
exit
'
else
echo " Kindly make sure before going for a shutdown"
fi
else
echo " Kindly make sure before going for a shutdown"
fi
No comments:
Post a Comment