Commit ec8d0960 authored by Leonardo Arena's avatar Leonardo Arena
Browse files

main/icecast: modernize init.d

Remove conf.d and make init compatible with supervise-daemon
parent f487ffee
......@@ -3,11 +3,11 @@
pkgname=icecast
pkgver=2.4.4
pkgrel=2
pkgrel=3
pkgdesc="Open source media server"
url="http://www.icecast.org"
arch="all"
license="GPL"
license="GPL-2.0-only"
install="$pkgname.pre-install"
pkgusers="icecast"
pkggroups="icecast"
......@@ -16,7 +16,7 @@ subpackages="$pkgname-doc $pkgname-openrc"
source="http://downloads.xiph.org/releases/icecast/icecast-$pkgver.tar.gz
conf-change-owner.patch
icecast.initd
icecast.confd"
"
# secfixes:
# 2.4.4-r0:
......@@ -42,11 +42,8 @@ check() {
package() {
make DESTDIR="$pkgdir" install
install -Dm755 "$srcdir"/icecast.initd "$pkgdir"/etc/init.d/icecast
install -Dm644 "$srcdir"/icecast.confd "$pkgdir"/etc/conf.d/icecast
install -d -o icecast -g icecast "$pkgdir"/var/log/icecast
}
sha512sums="e9ffb478cac2570891787455591d881a59185e067bb36f51706a7070cd9d82d80425ec8cf151f5ebb17d1b75654449fc760f8b82a1bb05f020b47ec09e46b4d0 icecast-2.4.4.tar.gz
3de3ed881a60f99d3e4cf656a46cdb157e95abcfa9bd44ebc7e13840a9b0ee84ec9e5b30878d67e42385dac5fa974694c215ad162b910c47b6b7864d474bf636 conf-change-owner.patch
c78f7e6aa9ff04f7400944e95485994a23493e79d47e0b9799b9235fa5f3ed9d64840be1380a262c30594f9fa2dac96d904226608bfc133d51b3a62ed90d990d icecast.initd
7e4299b34207bd4323bc89f2d98abebcb62cbeee3b0931d6d18e1c2c736a17e823b07dfb38364f22a375585843a917031beb1b9efe2fff71de036146371536f3 icecast.confd"
ca8db504a1279a8eeffa0861c96ec3b114590661deef934ae179b0d0307b8ed11329eea508743c64f17776e2eeb3d86cf000edd22d3452c09ac6fea35fb51678 icecast.initd"
ICEC_OPTS="-b -c ${icecast_conf:-/etc/icecast.xml}"
#!/sbin/openrc-run
name="Icecast 2"
command="/usr/bin/icecast"
command_background=yes
: ${cfgfile:=/etc/icecast.xml}
: ${command_user:=icecast}
: ${command_group:=icecast}
command_args="-c $cfgfile ${ICEC_OPTS}"
pidfile="/run/icecast/icecast.pid"
depend() {
need net
after firewall
}
start() {
ebegin "Starting Icecast 2"
start-stop-daemon --start --exec /usr/bin/icecast \
-- ${ICEC_OPTS}
eend $?
}
stop() {
ebegin "Stopping Icecast 2"
start-stop-daemon --stop --exec /usr/bin/icecast
eend $?
start_pre() {
checkpath --directory --owner $command_user:$command_group ${pidfile%/*} /var/log/icecast
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment