aboutsummaryrefslogtreecommitdiffstats
path: root/main/aports-build/aports-build.initd
blob: 709b8b999f7e2272cd5d5c2ccf07f3632ff7eeb0 (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
#!/sbin/runscript

# this script is deprecated but kept for a migration period

: ${mqtt_broker:="msg.alpinelinux.org"}
: ${git_branch:=master}
: ${mqtt_topic:="git/aports/$git_branch"}

command=/usr/bin/mqtt-exec
pidfile=/var/run/aports-build/mqtt-exec.pid
command_args="-h ${mqtt_broker:-msg.alpinelinux.org} -t $mqtt_topic -- /usr/bin/aports-build"
start_stop_daemon_args="--stdout /dev/null --stderr /dev/null --background --make-pid --user buildozer"

depend() {
	need net
}

start() {
	eerror "Please migrate to mqtt-exec.aports-build"
	return 1
}

stop_post() {
	# remove build status
	if [ -f /etc/aports-build.conf ]; then
		. /etc/aports-build.conf
	fi
	: ${hostname:=$(hostname)}
	: ${mqtthost:="msg.alpinelinux.org"}
	: ${status_clear:="mosquitto_pub -h $mqtthost -t build/$hostname -r -n"}
	$status_clear
	return 0
}