blob: 96b36e1886074923cf23943bc42d1d97eb2ee5c9 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh /etc/rc.common
2
3# Startup script
4# Copyright (C) 2015 OpenWrt.org
5
6USE_PROCD=1
7START=90
8STOP=15
9
10start_service() {
11 user_exists icecast 87 || user_add icecast 87
12 group_exists icecast 87 || group_add icecast 87
13
14 [ -d /var/log/icecast ] || {
15 mkdir -m 0755 -p /var/log/icecast
16 chown icecast:icecast /var/log/icecast
17 }
18
19 procd_open_instance
20 procd_set_param command /usr/bin/icecast -c /etc/icecast.xml
21 procd_set_param respawn
22 procd_close_instance
23}