Browse Source

- add minidlna to image

master
vanhofen 4 years ago
parent
commit
341812cff3
  1. 1
      make/ni.mk
  2. 4
      make/target-tools.mk
  3. 39
      skel-root/general/scripts/minidlnad.init

1
make/ni.mk

@ -69,6 +69,7 @@ ifeq ($(BOXSERIES),$(filter $(BOXSERIES),hd2 hd5x hd6x vusolo4k vuduo4k vuduo4ks
$(MAKE) bash $(MAKE) bash
$(MAKE) iperf $(MAKE) iperf
$(MAKE) minicom $(MAKE) minicom
$(MAKE) minidlna
$(MAKE) mc $(MAKE) mc
endif endif
ifeq ($(BOXSERIES),$(filter $(BOXSERIES),hd5x hd6x vusolo4k vuduo4k vuduo4kse vuultimo4k vuzero4k vuuno4k vuuno4kse vuduo)) ifeq ($(BOXSERIES),$(filter $(BOXSERIES),hd5x hd6x vusolo4k vuduo4k vuduo4kse vuultimo4k vuzero4k vuuno4k vuuno4kse vuduo))

4
make/target-tools.mk

@ -917,6 +917,10 @@ minidlna: $(MINIDLNA_DEPS) $(DL_DIR)/$(MINIDLNA_SOURCE) | $(TARGET_DIR)
$(MAKE) install DESTDIR=$(TARGET_DIR) $(MAKE) install DESTDIR=$(TARGET_DIR)
$(INSTALL_DATA) -D $(PKG_BUILD_DIR)/minidlna.conf $(TARGET_sysconfdir)/minidlna.conf $(INSTALL_DATA) -D $(PKG_BUILD_DIR)/minidlna.conf $(TARGET_sysconfdir)/minidlna.conf
$(SED) 's|^media_dir=.*|media_dir=A,/media/sda1/music\nmedia_dir=V,/media/sda1/movies\nmedia_dir=P,/media/sda1/pictures|' $(TARGET_sysconfdir)/minidlna.conf $(SED) 's|^media_dir=.*|media_dir=A,/media/sda1/music\nmedia_dir=V,/media/sda1/movies\nmedia_dir=P,/media/sda1/pictures|' $(TARGET_sysconfdir)/minidlna.conf
$(SED) 's|^#user=.*|user=root|' $(TARGET_sysconfdir)/minidlna.conf
$(SED) 's|^#friendly_name=.*|friendly_name=$(BOXMODEL):ReadyMedia|' $(TARGET_sysconfdir)/minidlna.conf
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/minidlnad.init $(TARGET_sysconfdir)/init.d/minidlnad
$(UPDATE-RC.D) minidlnad defaults 75 25
$(REMOVE)/$(MINIDLNA_DIR) $(REMOVE)/$(MINIDLNA_DIR)
$(TOUCH) $(TOUCH)

39
skel-root/general/scripts/minidlnad.init

@ -0,0 +1,39 @@
#!/bin/sh
. /etc/init.d/globals
start() {
if [ -e /var/etc/.minidlnad ]; then
minidlnad "$@"
fi
}
stop() {
if [ -e /var/etc/.minidlnad ]; then
kill -TERM $(pidof minidlnad)
fi
}
restart() {
stop
sleep 1
start "$@"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
force-reload)
restart -R
;;
*)
echo "[$BASENAME] Usage: $0 {start|restart|reload|force-reload|stop}"
;;
esac
Loading…
Cancel
Save