#!/bin/bash
/bin/sudo /sbin/init 0
[maciek@piotr Desktop]$ cat STOP.desktop
[Desktop Entry]
Comment[pl]=Zatrzymuje system
Comment=Zatrzymuje system
Exec=/home/maciek/Pobrane/stop
GenericName[pl]=STOP
GenericName=STOP
Icon=system-shutdown
MimeType=
Name[pl]=STOP
Name=STOP
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
ls -al /home/maciek/Pobrane/stop
[maciek@piotr ~]$ ls -al /home/maciek/Pobrane/stop
-rwxr--r-- 1 maciek maciek 221 maj 29 09:28 /home/maciek/Pobrane/stop*
[maciek@piotr ~]$ cat Pobrane/stop
#!/bin/bash
S=`Xdialog --timeout 30 --fixed-font --title "Zatrzymanie systemu" --yesno "Czy NATYCHMIAST wyłączyć system?" 8 85 2>/dev/null`
if [ $? -eq "1" ]
then
exit
else
/bin/sudo /sbin/init 0
Users browsing this forum: No registered users and 1 guest