Skip to content

Commit

Permalink
msd_lite: use upstream's sample file
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Dec 10, 2022
1 parent 57f5071 commit d54c300
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 100 deletions.
6 changes: 3 additions & 3 deletions net/msd_lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=msd_lite
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rozhuk-im/msd_lite.git
Expand All @@ -24,7 +24,7 @@ define Package/msd_lite
SECTION:=net
CATEGORY:=Network
TITLE:=Program for IP TV streaming on the network via HTTP
URL:=http://www.netlab.linkpc.net/wiki/ru:software:msd:lite
URL:=http://www.netlab.linkpc.net/wiki/en:software:msd:lite
endef

define Package/msd_lite/description
Expand All @@ -44,7 +44,7 @@ define Package/msd_lite/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/msd_lite $(1)/usr/bin/

$(INSTALL_DIR) $(1)/etc/msd_lite
$(CP) $(CURDIR)/files/msd_lite.sample $(1)/etc/msd_lite/msd_lite.conf.sample
$(CP) $(PKG_BUILD_DIR)/conf/msd_lite.conf $(1)/etc/msd_lite/msd_lite.conf.sample
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(CURDIR)/files/msd_lite.config $(1)/etc/config/msd_lite
$(INSTALL_DIR) $(1)/etc/init.d
Expand Down
21 changes: 12 additions & 9 deletions net/msd_lite/files/msd_lite.init
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,18 @@ start_instance() {
[ "$drop_slow_clients" = "1" ] && drop_slow_clients="yes" || drop_slow_clients="no"

mkdir -p "$CONFDIR"
sed -e "s,@threadsCountMax@,$threads,g" \
-e "s,@fBindToCPU@,$bind_to_cpu,g" \
-e "s,@bindList@,$bindlist,g" \
-e "s,@ifName@,$interface,g" \
-e "s,@fDropSlowClients@,$drop_slow_clients,g" \
-e "s,@precache@,$precache_size,g" \
-e "s,@ringBufSize@,$ring_buffer_size,g" \
-e "s,@rcvBuf@,$multicast_recv_buffer_size,g" \
-e "s,@rcvTimeout@,$multicast_recv_timeout,g" \
sed -e "/<bind><address>0.0.0.0:7088/d" \
-e "/<congestionControl>htcp/d" \
-e "s,<file>/root/msd_lite/msd_lite.log</file>,<file>/dev/null</file>,g" \
-e "s,<threadsCountMax>1,<threadsCountMax>$threads,g" \
-e "s,<fBindToCPU>yes,<fBindToCPU>$bind_to_cpu,g" \
-e "s,<bind><address>\[::\]:7088</address></bind>,$bindlist,g" \
-e "s,<ifName>vlan777,<ifName>$interface,g" \
-e "s,<fDropSlowClients>no,<fDropSlowClients>$drop_slow_clients,g" \
-e "s,<precache>4096,<precache>$precache_size,g" \
-e "s,<ringBufSize>1024,<ringBufSize>$ring_buffer_size,g" \
-e "s,<rcvBuf>512,<rcvBuf>$multicast_recv_buffer_size,g" \
-e "s,<rcvTimeout>2,<rcvTimeout>$multicast_recv_timeout,g" \
"$CONF" > "$CONFDIR/$section.conf"

procd_open_instance "$section"
Expand Down
88 changes: 0 additions & 88 deletions net/msd_lite/files/msd_lite.sample

This file was deleted.

0 comments on commit d54c300

Please sign in to comment.