here is my workaround on how to run a script after the PC resumes from suspend.
This is at least working on Lucid Lynx.
1. Have a look at folder /etc/pm/sleep.d/ - all scripts within this folder are automatically run as root-user after/before suspend or hibernate.
2. A script needs to look like this example:
EXAMPLE:Code:#!/bin/bash case "$1" in hibernate|suspend) ACTION BEFORE SUSPEND/HIBERNATE ;; thaw|resume) ACTION AFTER RESUME ;; *) ;; esac exit $?
Let's say you want to runafter resume.Code:/etc/init.d/icecast2 restart
Here is what you need to do:
Type in a terminal:
Then give it the following content:Code:sudo touch /etc/pm/sleep.de/99-icecast-restart.sh sudo chmod +x /etc/pm/sleep.de/99-icecast-restart.sh sudo nano /etc/pm/sleep.de/99-icecast-restart.sh
That's allCode:#!/bin/bash case "$1" in thaw|resume) /etc/init.d/icecast2 restart 2>/dev/null ;; *) ;; esac exit $?
Hope this is helpful to anybody, because I spent hours to google for it.
German version: here