Posts by Eduardo • 1 point
1 post
-
-1
votes2
answers1140
viewsA: Script to shut down the computer when closing a particular program
#!/bin/sh PROGRAMA='rdesktop' while [ TRUE ] do if xlsclients | grep -v grep | grep $PROGRAMA > /dev/null then echo "$PROGRAMA está rodando" else echo "$PROGRAMA não está rodando" sudo reboot fi…