-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac.osx.startup
52 lines (41 loc) · 1.17 KB
/
mac.osx.startup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
These directions fro a Mac OS X startup file were contributed by a Mac user.
1/ Create a directory called /Library/StartupItems/noip2
if it does not already exist.
2/ Create a file called StartupParameters.plist in it
with the following contents:
{
Description = "No-IP Dynamic DNS Update Client";
Provides = ("No-IP Dynamic DNS Update Client");
Requires = ("DirectoryServices");
Uses = ("Disks", "NFS");
OrderPreference = ("None");
}
3/ Create a file called noip2 in it with the following contents:
#!/bin/sh
##
# No-IP.com Dynamic DNS Update Client
##
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting No-IP.com Dynamic DNS Update Client"
/usr/local/bin/noip2
}
StopService ()
{
ConsoleMessage "Stopping No-IP.com Dynamic DNS Update Client"
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done
}
RestartService ()
{
ConsoleMessage "Restarting No-IP.com Dynamic DNS Update Client"
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done
/usr/local/bin/noip2
}
RunService "$1"