aboutsummaryrefslogtreecommitdiff
path: root/init.d/local
blob: 9b83752d84658c59c34dd3421c051609112cae62 (plain)
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
#!/sbin/runscript
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.

description="Executes user commands in /etc/conf.d/local"

depend()
{
	after *
	keyword notimeout
}

start()
{
	ebegin "Starting local"

	if type local_start >/dev/null 2>&1; then
		local_start
	fi

	# Support old configs
	if [ -e /etc/conf.d/local.start ]; then
		. /etc/conf.d/local.start
	fi

	eend $? "Failed to start local"
}

stop()
{
	ebegin "Stopping local"

	if type local_start >/dev/null 2>&1; then
		local_stop
	fi

	# Support old configs
	if [ -e /etc/conf.d/local.stop ]; then
		. /etc/conf.d/local.stop
	fi

	eend $? $"Failed to stop local"
}