Scheduled Job at reboot

  • I have Tiny Tiny RSS installed with openmediavault-nginx en openmediavault-mysql.
    Everything is working great. :)


    I use a scheduled job to update the feeds
    My settings are:
    Time of execution: at reboot
    User: ben
    Command: php /media/uuid/www-data/tt-rss/update_daemon2.php


    I want to use an other user then root (advice from Tiny Tiny RSS) but then it doesn't work.


    Does anybody know what I am doing wrong???


    Thanks, Ben

    Einmal editiert, zuletzt von ben-nl ()

  • @ tekkb As promised...


    Install Tiny Tiny RSS on OpenMediaVault


    Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) reader and aggregator.
    https://tt-rss.org/redmine/projects/tt-rss/wiki


    You need have two plugins installed:
    openmediavault-mysql and openmediavault-nginx.


    Let's Start


    1. Make a shared folder "www-data" in OMV


    2. Clone tt-rss repository using Git:

    Code
    cd /media/uuid/www-data && git clone https://github.com/gothfox/Tiny-Tiny-RSS.git tt-rss


    3.

    Code
    apt-get install php5-gd

    and

    Code
    apt-get install php5-curl



    4. Make a shared folder "www-data/tt-rss" in OMV


    5. Make a database "ttrss" and user "ttrss" in MySQL


    6. Make a certificate in OMV


    7. Add a pool in Nginx (websites)


    9. Add a server in Nginx (websites)


    10. Go to website of Tint Tiny RSS (https://ip-of-server:4080//install/index.php and folow the instructions.
    noot-1: username: admin password: password (change this after first login)
    noot-2: if there are errors about write permissions

    Code
    chmod -R 777 /media/uuid/www-data/tt-rss/cache


    When you are done, you have to make a scheduled job in OMV
    update feeds every 30 minutes

    Code
    php /media/uuid/www-data/tt-rss/update.php --feeds --quiet


    You're done, go to your website of Tint Tiny RSS (https://ip-of-server:4080)


    Greetings, Ben

    Einmal editiert, zuletzt von ben-nl ()

  • Ben, just want to let you know I took a loot at this. I would not need the nginx plugin to have it hosted by nginx. Also, I saw that it seems to run fasster with PostgreSQL. I think we need a news reader. There are some things I want to finish before I come back to this though. Give it some time.


    You are running a job at reboot and don't want to use root???? correct??? Did you make ben the owner of the job??? You are trying to use the ben owner?


    Well the update daemon at this location is owned by www-data:
    /media/uuid/www-data/tt-rss/update_daemon2.php


    Try to use the "www-data" user for your update job. See if that works.

  • Hello tekkb,


    First of all thanks for your reply.


    I think we need a news reader.


    I think so too... :)


    Try to use the "www-data" user for your update job. See if that works.


    Never thought of that... ;(;(;(


    About PostgreSQL, I never tried it but the maker recommends PostgreSQL.


    Thanks, Ben

  • Hello tekkb,


    When I use www-data as user the update daemon also didn't start on reboot.


    When I execute manualy it runs fine.


    Thanks, Ben

  • Does it work with rooot??? It may be because it needs to be on a disk that is not mounted noexec. And/or perms on the php command. Give me results of the stat command:


    cd /media/uuid/www-data/tt-rss (put in whatever your uid is)
    stat update_daemon2.php

  • Hello tekkb,


    When I execute cronjob manualy as root I get this message:

    Code
    Tiny Tiny RSS was unable to start properly. This usually means a misconfiguration or an incomplete upgrade.
    Please fix errors indicated by the following messages:
    
    
     * Please don't run this script as root.
    
    
    You might want to check tt-rss wiki or the forums for more information.
    Please search the forums before creating new topic for your question.


    The results of stat update_daemon2.php

    Code
    root@server:/media/f9805a5e-40eb-4822-9c28-01e6e1432bd4/www-data/tt-rss# stat update_daemon2.php
      Bestand: ‘update_daemon2.php’
      Grootte: 6255         Blokken: 16           IO-blok: 4096   normaal bestand
    Apparaat: 801h/2049d   Inode: 1313649      Koppelingen: 1
    Toegang: (0775/-rwxrwxr-x)   UID: (   33/www-data)   GID: (   33/www-data)
    Toegang:   2015-07-22 22:55:04.435313154 +0200
    Gewijzigd: 2015-07-22 21:13:48.065111436 +0200
    Veranderd: 2015-07-22 22:52:56.952579922 +0200
    Ontstaan:  -



    Greetings Ben

  • I checked and other people are using www-data as the user to update the news feeds.


    so use this user:
    www-data


    enter the command like this though:
    /usr/bin/php /media/uuid/www-data/tt-rss/update.php --feeds --quiet


    I am thinking you need the path to php, which is a runaround symlink to php5

  • Install Tiny Tiny RSS with PostgreSQL plugin:


    1) Install openmediavault-postgresql plugin


    2) enable the plugin and put check sql management site. Then click on Save.


    3) Now put in new password and click on reset password


    3.1) You can now login to the MyWebSQL site using:
    id: postgres
    pass: the password you just set
    Server: localhost PostgreSQL
    Then click on login. This is just infromational. I am going to setup the database for Tiny Tiny RSS in command line.


    4) In command line do the following from root ssh session:
    su - postgres
    psql
    CREATE USER "www-data" WITH PASSWORD 'yourpasshere'; (use password you want for the database)
    CREATE DATABASE ttrss WITH OWNER "www-data";
    \quit
    exit


    5) Go to data drive you want the Tiny Tiny RSS reader on. So UUID will be the UUID number of the drive you want:

    Code
    cd /media/UUID/
    wget -O ttrss.tar.gz https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.15.3.tar.gz
    tar -xvzf ttrss.tar.gz
    rm ttrss.tar.gz
    mv Tiny-Tiny-RSS* ttrss
    chown -R www-data:www-data ttrss
  • Hello tekkb,


    Started working on it....


    This is great news..... :D


    @ben-nl I setup an hourly job in this format and it is working fine.


    I'll do that..


    Thanks for your hard work and advice.... :D


    Greetings Ben

    Einmal editiert, zuletzt von ben-nl ()

  • If anyone is interested here is my preliminary nginx conf and fpm file.


    The UUID in this file would be changed to your own.
    /etc/nginx/openmediavault-webgui.d/openmediavault-ttrss.conf


    /etc/php5/fpm/pool.d/openmediavault-ttrss.conf


    There will be some adjustments. But you get the idea. I've never used the nginx plugin.

  • If anyone is interested here is my preliminary nginx conf and fpm file.


    Learning every day... :D


    Is working great, I am going to try this on a other install (spotweb).


    Thanks, Ben

  • Ben, there are a lot of different ways this can be setup. I think the PostgreSQL was a good move. It is running really fast and nice with it. But then there is this update feed thing. They suggest to run it as a daemon instead of a cron job. Running it as daemon would work better with the design of OMV too, the way the apply config works. We set lots of things up as a subdirectory to however your domain/subdomain may be set up. This is why when I login I have:
    http:/omvaddress/ttrss/
    or
    https:/omvaddress/ttrss/
    Using this method you can get SSL via OMV instead of setting it up separately. I don't open port 80 to the net. If you open port 443 to the net and have it forwarded by your router to your OMV you can reach TTRSS by:
    https://wanip(or domain, or ddns address)/ttrss/


    Anyway, I need to use this for a week, or so, before I decide on how to treat SSL and some other things. I have decided daemon is better for the updates. A lot of the guides I see are not that great and none of them take into consideration how OMV works. I am leaning towards not having SSL on all the time and someone wants to use it through the internet they use OMV's SSL. But I have not tried the mobile apps. They could change my mind. If someone has opinions say something.

  • Hello tekkb,


    https:/omvaddress/ttrss/
    Using this method you can get SSL via OMV instead of setting it up separately. I don't open port 80 to the net. If you open port 443 to the net and have it forwarded by your router to your OMV you can reach TTRSS by:
    wanip(or domain, or ddns address)/ttrss/


    I have been using this for a while with openmediavault-nginx plugin.
    With ssl and ip and port.


    In ttrss you also can enable Two-factor authentication.


    On my android phone I use Tiny Tiny RSS (with unlocker) made by Andrew Dolgov.
    https://play.google.com/store/apps/details?id=org.fox.ttrss


    I like it very much and never had any problems.


    Greetings, Ben

  • With a plugin you will never use the nginx plugin to create the website files for the site that needs to be hosted. There will be a nginx and fpm config file installed by the plugin. The nginx plugin is just to make it easy for you guys to host a website.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!