source: trunk/PesterSleepFixer/StartupItems/PesterSleepFixer/PesterSleepFixer@ 334

Last change on this file since 334 was 334, checked in by Nicholas Riley, 15 years ago

Workaround for Pester 1.0 failing with active alarms on sleep.

File size: 1.0 KB
Line 
1#!/bin/sh
2#
3# Pester Sleep Fixer start script
4
5# The Run/Restart/Start/StopService routines appeared in /Library/StartupItems/PesterSleepFixer/rc.common with
6# Mac OS X 10.2. For earlier systems, we define our own RunService routine.
7RunService ()
8{
9 ConsoleMessage "Starting Pester Sleep Fixer"
10 /Library/StartupItems/PesterSleepFixer/pester-sleepfixer -d -V -s /Library/StartupItems/PesterSleepFixer/rc.sleep -w /Library/StartupItems/PesterSleepFixer/rc.wakeup
11 /Library/StartupItems/PesterSleepFixer/rc.wakeup
12 return 0
13}
14
15. /etc/rc.common
16
17StartService ()
18{
19 ConsoleMessage "Starting Pester Sleep Fixer"
20 /Library/StartupItems/PesterSleepFixer/pester-sleepfixer -d -V -s /Library/StartupItems/PesterSleepFixer/rc.sleep -w /Library/StartupItems/PesterSleepFixer/rc.wakeup
21 /Library/StartupItems/PesterSleepFixer/rc.wakeup
22 return 0
23}
24
25StopService ()
26{
27 ConsoleMessage "Stopping Pester Sleep Fixer"
28 killall pester-sleepfixer
29 /Library/StartupItems/PesterSleepFixer/rc.sleep
30 return 0
31}
32
33RestartService ()
34{
35 StopService
36 StartService
37}
38
39RunService "$1"
Note: See TracBrowser for help on using the repository browser.