-
Notifications
You must be signed in to change notification settings - Fork 15
Install (FreeBSD)
awein edited this page Oct 9, 2012
·
2 revisions
This guide is partly untested. Please report feedback!
python27 py27-dnspython py27-argparse py27-netifaces py27-ipy avahi-app bash
git clone git://github.com/awein/SleepProxyClient.git
cd SleepProxyClientcp debian/sleepproxyclient.default /etc/defaults/sleepproxyclient
mkdir -p /usr/share/sleepproxyclient/scripts
cp sleepproxyclient.* /usr/share/sleepproxyclient/scripts
cp checkSleep.sh /usr/share/sleepproxyclient/scripts
cp 00_sleepproxyclient /usr/share/sleepproxyclient/apm_script.sh
- Alternative 1: Via apmd (
/etc/apmd.conf)
...
apm_event SUSPENDREQ {
exec "/usr/bin/env bash /usr/share/sleepproxyclient/scripts/apmd.sh suspend"
exec "/etc/rc.suspend apm suspend";
}
...
apm_event NORMRESUME {
exec "/etc/rc.resume apm suspend";
exec "/usr/bin/env bash /usr/share/sleepproxyclient/scripts/apmd.sh resume"
}
apm_event STANDBYRESUME {
exec "/etc/rc.resume apm standby";
exec "/usr/bin/env bash /usr/share/sleepproxyclient/scripts/apmd.sh resume"
}
...
- Alternative 2: Via
/etc/rc.suspendand/etc/rc.resume/etc/rc.suspend
...
echo $$ 2> /dev/null > /var/run/rc.suspend.pid
#call sleepproxyclient suspend script
/usr/bin/env bash /usr/share/sleepproxyclient/scripts/apmd.sh suspend
...
/etc/rc.resume
...
#call sleepproxyclient resume script
/usr/bin/env bash /usr/share/sleepproxyclient/scripts/apmd.sh resume
exit 0
To trigger the scripts setup earlier apm -z should be used to suspend the system.
Note: This step is untested due to my VM-setup does not support any sleep states
See the documentation on how to setup checkSleep.sh or just use your own solution...