I always shutdown my Linuxes with Ctrl-Alt-Del.
Now I want that the system still shutdowns with Ctrl-Alt-Del, but only if certain CONDITION is satisfied.
Something like this:
#!/bin/bash
if [[ ! CONDITION ]]; then
echo
echo " *************************"
echo " *************************"
echo " ** **"
echo " ** WRONG CONDITION **"
echo " ** **"
echo " *************************"
echo " *************************"
echo
else
sudo shutdown -h now
fi
I guess that I can do a service/target thing, but I have failed miserably....