I often run long calculations on my computer and I would like to shut it down when this are terminated.
Is there some option to shutdown the computer when a specific process termanates? Thanks for the help!
This should do the trick:
http://www.makeuseof.com/tag/cuttlefish-set-actions-reactions-automate-ubuntu/
I don't know any out-of-the-box solution for this, but you could make cron check if the process is still there every hour or so. You could put something like this in a suitable place chmod it executable by root and symlink to it from /etc/cron.hourly :
#!/bin/bash
PROCESSNUM = `ps x | grep -c "calculationthingy"`
if [ "$PROCESSNUM" -lt 1 ]
then
# Make sure this in inactivated!
rm symlink_in_etc_hourly
shutdown -h now
fi