#1 Restart Option - How To Get Working?

closed
nobody
None
5
2010-02-10
2010-02-06
Will
No

Hi,

Very nice. :)

Sadly the "restart" button does not restart, but just kills MiniDLNA.

How can I get it working properly? I see no config of any kind?

Thanks,

Will

Discussion

  • Stedy

    Stedy - 2010-02-06

    You need to have he init.d sctipt installed.

    manauly you could install it from the linux dir from minidlna cvs:

    sudo cp minidlna.init.d.script /etc/init.d/minidlna
    sudo chmod +x /etc/init.d/minidlna
    sudo update-rc.d minidlna defaults
    to remove the startup schript then : sudo update-rc.d -f minidlna remove

    Another option is to use my ppa if you use ubntu.
    https://launchpad.net/~stedy6/+archive/stedy-minidna

     
  • Will

    Will - 2010-02-06

    Hi,

    All right, I found this guide: http://wiki.flexion.org/DLNAServer.html

    Followed it and it's working great with this Webmin Module now. :)

    Now just to get it working on start-up.

    Since it has to run as root, then I need to run sudo visudo and add it to the list, but what folder/file do I use?

    I tried: rob ALL = NOPASSWD: /usr/sbin/minidlna

    But no luck. Says PW is bad when it tries to run on startup (since visudo line is not working).

    But once that does work then I can add MiniDLNA to System > Preferences > Startup Applications:

    sh -c "sleep 10 && sudo /etc/init.d/minidlna start &"

    Any thoughts on how I can get this working?

    Thanks a lot,

    Will

     
  • Nobody/Anonymous

    Im not sure why you should "rob ALL = NOPASSWD: /usr/sbin/minidlna".. it should be enough to use the guide at http://wiki.flexion.org/DLNAServer.html. -the next time you reboot the minidlna would start as root. This because init proses run as root.

    ps -aux |grep minidlna would show if the prosses is runing.

    you dont need to use MiniDLNA to System > Preferences >
    Startup Applications: when you use init.d scripts.

     
  • Will

    Will - 2010-02-06

    I followed that guide completely.

    And it is not running on start-up. Rebooted 3 times to be sure.

    ps -aux |grep minidlna shows:

    Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
    rob 8805 0.0 0.0 7336 888 pts/0 S+ 07:06 0:00 grep --color=auto minidlna

    Not shown in system monitor either.

    I see you posted on https://sourceforge.net/projects/minidlna/forums/forum/879956/topic/3093666 that it seems solved.

    Not here. :(

     
  • Nobody/Anonymous

    hmm. do u run ubuntu?

    You could try what i did when it did't work here..

    In webmin:
    System->Bootup and Shutdown
    is minidlna in that list?

    if not:
    Create a new bootup and shutdown action.
    name it minidlna and past the follwoing into Bootup commands:

    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides: minidlna
    # chkconfig: 345 99 10
    # description: Startup/shutdown script for MiniDLNA daemon
    # Short-Description: Start minidlna at boot time
    # $Id: minidlna.init.d.script,v 1.2 2009/07/02 00:33:15 jmaggard Exp $
    # MiniUPnP project
    # author: Thomas Bernard
    # Required-Start:
    # Required-Stop:
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    ### END INIT INFO

    MINIDLNA=/usr/sbin/minidlna
    ARGS='-f /etc/minidlna.conf'

    test -f $MINIDLNA || exit 0

    . /lib/lsb/init-functions

    case "$1" in
    start) log_daemon_msg "Starting minidlna" "minidlna"
    start-stop-daemon --start --quiet --pidfile /var/run/minidlna.pid --startas $MINIDLNA -- $ARGS $LSBNAMES
    log_end_msg $?
    ;;
    stop) log_daemon_msg "Stopping minidlna" "minidlna"
    start-stop-daemon --stop --quiet --pidfile /var/run/minidlna.pid
    log_end_msg $?
    ;;
    restart|reload|force-reload)
    log_daemon_msg "Restarting minidlna" "minidlna"
    start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/minidlna.pid
    start-stop-daemon --start --quiet --pidfile /var/run/minidlna.pid --startas $MINIDLNA -- $ARGS $LSBNAMES
    log_end_msg $?
    ;;
    *) log_action_msg "Usage: /etc/init.d/minidlna {start|stop|restart|reload|force-reload}"
    exit 2
    ;;
    esac
    exit 0

    If this does not work. Add my PPA to you source list.

     
  • Will

    Will - 2010-02-06

    Executing /etc/init.d/minidlna start ..

    * Starting minidlna minidlna
    start-stop-daemon: --start needs --exec or --startas
    Try `start-stop-daemon --help' for more information.
    /etc/init.d/minidlna: 374: --startas: not found
    ...fail!

     
  • Will

    Will - 2010-02-06

    And yes running Ubuntu Karmic 9.10 Server.

    I added your PPA but no updates or anything show up.

     
  • Stedy

    Stedy - 2010-02-06

    I gusess you would find minidlna in System->Administration->Synaptic Package Manager

     
  • Will

    Will - 2010-02-06

    OH, OK got ya.. trying now

     
  • Stedy

    Stedy - 2010-02-06

    after you install the ppa:
    sudo apt-get install minidlna

    should also work from the command line

     
  • Will

    Will - 2010-02-06

    Hi,

    OK. Success! :)

    Thank you so much for your help with this. :D

    Have a great weekend.. I'm going to sleep now. Been up 18 hours..

    Take Care,

    Will

     
  • Will

    Will - 2010-02-06

    Hi,

    Well, got enough sleep. ;) Thanks again!

    Just one question, is there any way you could add a "Refresh Shares" button?

    Would this would do would first stop MiniDLNA, then it would delete the "Files.db", and then start MiniDLNA. This forces it to rescan your media.

    I'm often finding myself having to do this manually by logging into the server via remote desktop.

    Would be much easier via Webmin.

    Thanks again,

    Will

     
  • Stedy

    Stedy - 2010-02-10

    Closed:
    You need to have init script installed to use rescan and restart button.
    You could use my PPA at: https://launchpad.net/~stedy6/+archive/stedy-minidna
    I would try to update this PPA whenever minidlna cvs is updated.

     
  • Stedy

    Stedy - 2010-02-10
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks