Timed scanning…

Viewing 7 posts - 11 through 17 (of 17 total)
  • Author
    Posts
  • #7504
    Dave.B
    Participant

    Thanks M@rk for the sanity check.
    I suspect Fizze was only trying to catch me out so that I did some reading around, and it worked.
    I’ve verified that the command part works, so I’ll go ahead and add the line to /etc/crontab

    While I’m here: what’s the difference between adding it to:
    /etc/crontab ;
    and adding it to:
    /opt/etc/crontab?
    Does the former run at user level (root) and the latter at system level? If so, which is preferable? And why?

    #7505
    mas
    Participant

    /etc is where the crond looks that comes with unslung automatically. Yes you dont have to do an ipkd install cron.

    if you install that cron extra it should look in /opt/etc/ though.

    Look at the other entries in the crontab. The crontab entries should actually also have an extra field for the username it shall run as!

    #7506
    Dave.B
    Participant

    Mas,
    That probably explains why Firefly was not responding this morning. I assume the command ran at 5am this morning, but without the user field it got a bit stuck.
    I’ll restart when I get home and fix that.
    There are 3 other commands in my crontab file – they all run as root so I take it this one should too?

    #7507
    fizze
    Participant

    no!
    they should run as the user that is specified in mt-daapd.conf file, the user mt-daapd runs as.

    #7508
    Dave.B
    Participant

    Fizze, when you say “they”, do you mean the lines already there, which I haven’t changed in any way, or do you mean new lines that I add?

    If the latter, then…

    0 5 * * * guest /opt/bin/wget http://user:password@server:port/config-update.html?action=rescan

    would seemingly do the job, right?

    #7509
    mas
    Participant

    It should not matter which user it runs as. After all it needs no special rights to use wget to access a webpage (the password is coded in the link). So use nobody or whatever low right account you have there. Guest will also do if it can run wget and is a valid account.

    #7510
    Dave.B
    Participant

    Hmmm… Well guest is an account, as that is what is specified in mt-daapd.conf for Firefly to run as. I have no idea what the password is though so I can’t log in to check whether wget works in the guest account.
    Is there any particular reason why I don’t want to run it as root?

    Thanks for your time.

Viewing 7 posts - 11 through 17 (of 17 total)
  • The forum ‘Feature Requests’ is closed to new topics and replies.