#!/bin/bash

zenity --question --text="Restart?"

if [ $? == 0 ]
then
   dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

else
exit
fi