What's new

entware services not autostarting

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

NeoDragon

Occasional Visitor
I've installed entware on a rt-ac56u with transmission and minidlna. transmission and minidlna are not starting by themselves on reboot , I have to manually input in putty "/opt/etc/init.d/S90minidlna start" so the service starts.
I've tried to add it to /jffs/scripts/post-mount with no luck so far.
Anyone can help?

Edit : I was able to add transmission to the boot process by adding it to /jffs/scripts/post-mount , but Minidlna just won't cooperate :/
Edit2 : So far , adding /opt/etc/init.d/S90minidlna start to post-mount and services-start failed. Adding minidlna -f /opt/etc/minidlna.conf also failed.
 
Last edited:
I've tried to add it to /jffs/scripts/post-mount with no luck so far.
Hi,

You need to look into the timing: Do you have only one USB device? For each USB device postmount script ist called with the parameter which mount was created.
service-start script might be called before(!) the postmount script (look into the syslog.log) and then the start of Entware has to fail as the USB device is not mounted yet.

The postmount script is the right place but only with the checking of the mounted device and adding a sleep could be also a good idea - see my example below! :rolleyes:

With kind regards
Joe :cool:

#!/bin/sh
# Enable logging
/usr/bin/logger -t START_$(basename $0) "started [$@]"
SCRLOG=/tmp/$(basename $0).log
touch $SCRLOG
NOW=$(date +"%Y-%m-%d %H:%M:%S")
echo $NOW "START_$(basename $0) started [$@]" >> $SCRLOG
# exec 3>&1 4>&2 >$SCRLOG 2>&1
if [ $1 = "/tmp/mnt/usb-stick" ]
then
/bin/sleep 10
ln -sf $1/entware.arm /tmp/opt >> $SCRLOG
/opt/etc/init.d/rc.unslung start >> $SCRLOG

[ -e /opt/bin/stbup ] && /opt/bin/stbup -C /opt/etc/stbup.conf >> $SCRLOG &
fi
#
if [ $1 = "/tmp/mnt/Data" ]
then
echo Do-nothing!
fi
# Finish logging
NOW=$(date +"%Y-%m-%d %H:%M:%S")
if [ "$?" -ne 0 ]
then
echo $NOW "Error in postmount execution! Script: $0" >> $SCRLOG
else
echo $NOW "Postmount execution OK. Script: $0" >> $SCRLOG
fi
/usr/bin/logger -t STOP_$(basename $0) "return code $?"
# exec 1>&3 2>&4
exit $?
 
Thanks for the reply Joe!
I have 2 usb connected to a rt-ac56u. One usb-flash2.0 and one usb-hdd3.0

usb-flash mounted to /mnt/entware
usb-hdd mounted to /mnt/NetworkHDD

I will try your post-mount script and report :)
Thanks again!

Edit: Now "/opt/etc/init.d/rc.unslung start" starts transmission properly but not minidlna ?
Code:
2015-03-10 13:17:34 START_post-mount started [/tmp/mnt/entware]
[1;37m Starting transmission-daemon...             [1;32m done. [m
[1;37m Starting minidlna...             [1;32m done. [m
2015-03-10 13:17:46 Postmount execution OK. Script: /jffs/scripts/post-mount
2015-03-10 13:17:52 START_post-mount started [/tmp/mnt/NetworkHDD]
2015-03-10 13:17:52 Postmount execution OK. Script: /jffs/scripts/post-mount
 
Last edited:
I'm got same problem...
Entware on stock 1031 firmware + transmission + minidlna (minidlna from entware, fw's minidlna cause too often disappears).
In log both starts after reboot:
...
admin: Started transmission-daemon from .
admin: Started minidlna from .
...
In reality - transmission works, minidlna not.
Checked by web: ip:8200
and by service: /opt/etc/init.d/S90minidlna check
Manually starts of
/opt/etc/init.d/S90minidlna
works good to next reboot.

Firmware stock (1031), so /jffs/ can be written, but not executing. Can't use Merlin fw - have not fixed bugs critical for me.
What todo, guys? :) Second start try throught nvram script?
 
Cap, I'm not using :) But need autostart for service... without jffs or switch on jffs on new stock fw.
Or may be some one can advise alternative DLNA server from entware packages? To many problems with minidlna...
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top