View Single Post
Old 17-12-2013, 20:41   #13402
pcairoli
Senior Member
 
Iscritto dal: Jun 2013
Messaggi: 502
quick reply from asus forum

ecco cosa mi ha risposto l'utente SATNAV con vero spirito internauta... direi da OM!

Hi,

The script that I modified is the “S50Mediaserver” that can be found at “/opt/etc/init.d”

You can also go direct to it via the network share where it is located in the “asusware\etc\init.d” folder however be careful if editing it via windows as linux text files only have a “LF” between lines whereas windows text editors tend to insert a “CR/LF” so if you edit with notepad for example, it will all be concatenated plus you need to make sure you don’t insert “CR”s into the edited file.

OK the bit of the script that handles the “firewall-start” is almost the first bit of code. Essentially I changed:

echo "MS firewall-restart"
MINIDLNA=`nvram get ms_dlna`
DAAPD=`nvram get ms_daapd`
killall -9 mt-daapd
killall -9 minidlna
killall -9 mDNSResponder
LAN_IPADDR=`nvram get lan_ipaddr`
COMP_NAME=`nvram get computer_name`

to:

echo "MS firewall-restart"
LAN_IPADDR=`nvram get lan_ipaddr`
OLD_IPADDR=`nvram get old_ipaddr`
if [ "$OLD_IPADDR" == "$LAN_IPADDR" ]; then
exit 2
else
nvram set old_ipaddr=$LAN_IPADDR
fi

MINIDLNA=`nvram get ms_dlna`
DAAPD=`nvram get ms_daapd`
killall -9 mt-daapd
killall -9 minidlna
killall -9 mDNSResponder
COMP_NAME=`nvram get computer_name`

i.e. I moved one line up and inserted 6 additional lines.

I hope this helps.


chi avesse tempo (io no in questo momento...magari se riesco a staccare qualche giorno a Natale... ) posti un feedback ( e nel caso lo giro io ... spero che non si configuri come xposting )

pace e bene
pcairoli è offline   Rispondi citando il messaggio o parte di esso