I'm trying to restrict users to specific applications (in this case, remmina with plugins), but no matter where I place/start my script, even after the specific application exits, tinycore still does not shutdown.
The script is meant to be flexible, calling on APPLICATION to specify what application to check on.
#!/bin/sh
APPLICATION='remmina'
while true
do
if ps ax | grep -v grep | grep $APPLICATION > /dev/null
then
echo "$APPLICATION running, everything is fine"
else
exitcheck.sh shutdown
fi
done
Can someone help me build a script that can shutdown tinycore if an application exits? (either closed by user or programmatically by another script, or errors, hopefully it won't matter...)