script I use to shutdown/reboot

This commit is contained in:
Cedric Girard 2011-06-15 17:50:09 +02:00
parent bc2b8dbda1
commit 82fe3d8c3e
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
gxmessage -center -buttons "Cancel:42,Close session:0,Reboot:2,Shutdown:3" -default "Close session" -timeout 60 What do you want ?
retval=$?
if [ $retval -eq 0 ] ; then
pkill xmonad;
elif [ $retval -eq 2 ] ; then
sudo shutdown -r now;
elif [ $retval -eq 3 ] ; then
sudo shutdown -h now
#else
#echo "do nothing";
fi