What's new
  • 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!

Creating minidlna.postconf

jacob0910

New Around Here
I'm interested in becoming more familiar with postconf, so I thought I'd start out with minidlna.postconf and use it to add a video path.

I created minidlna.postconf with a text editor, Notepad to be precise, with the following:

Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

pc_append "media_dir=V,/mnt/MEDIAEXT3/video" $CONFIG

...copied the file to /jffs/scripts and made it executable:

Code:
chmod a+rx /jffs/scripts/minidlna.postconf

After rebooting the router (AC66U 376.48_3), I cannot see the video share. Am I missing a step?
 
Use Notepad++ for linux scripts, normal windows notepad will never work.
Try to execute your script manually and you'll see the error

sh /jffs/scripts/minidlna.postconf
 
Last edited:
Use Notepad++ for linux scripts, normal windows notepad will never work.

Thank you for the suggestion. I've recreated minidlna.postconf with Notepadd++. What's the issue with notepad? Just curious.

Try to execute your script manually and you'll see the error

sh /jffs/scripts/minidlna.postconf

Manually running the script gives me the following error:

Code:
'jffs/scripts/minidlna.postconf: source: line 3: can't open '/usr/sbin/helper.sh

Listing the directory contents of /usr/sbin shows helper.sh:

Code:
-rwxr-xr-x    1 admin    root           876 Nov 20 12:26 helper.sh

Should I re-apply the firmware?
 
Use "appending conf files"
Code:
ipkg install nano
if using optware
Code:
opkg install nano
if using entware
Now create minidlna.conf.add
Code:
nano /jffs/scripts/minidlna.conf.add
Paste this line
media_dir=V,/mnt/MEDIAEXT3/video
Save with Ctrl-O, Confirm with Enter and exit nano editor with Ctrl-X
Make script executable
Code:
chmod a+rx /jffs/scripts/minidlna.conf.add
Reboot router
Code:
reboot
Login again and check if your line is added to minidlna.conf
Code:
cat /tmp/etc/minidlna.conf

You can have a look here for minidlna where minidlna.conf can be edited without other startup scripts, depends witch version you choose: optware, entware, debian.
https://www.asuswrt.eu
 
Similar threads

Similar threads

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!
Back
Top