aboutsummaryrefslogtreecommitdiff
path: root/multimedia/icecast/files/icecast.init
blob: 27b76f74e6b7e7e759904f1e5bf5e5ec6e8c68f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh /etc/rc.common

# Startup script
# Copyright (C) 2015 OpenWrt.org

USE_PROCD=1
START=90
STOP=15

start_service() {
	user_exists icecast 87 || user_add icecast 87
	group_exists icecast 87 || group_add icecast 87

	[ -d /var/log/icecast ] || {
		mkdir -m 0755 -p /var/log/icecast
		chown icecast:icecast /var/log/icecast
	}

	procd_open_instance
	procd_set_param command /usr/bin/icecast -c /etc/icecast.xml
	procd_set_param respawn
	procd_close_instance
}