Page 2 of 2

Re: Help using start-stop-daemon under debian (Raspberry PI)

Posted: 19 Jan 2017, 22:23
by elmicha
I'm using this /etc/systemd/system/tt-rss.service:

Code: Select all

[Unit]
Description=Tiny Tiny RSS Updater

[Service]
Type=simple
User=www-data
Group=www-data
ExecStart=/bin/sh -c '/var/www/tt-rss/update_daemon2.php >>/var/log/tt-rss.log'
WorkingDirectory=/var/www/tt-rss
Restart=always
RestartSec=5

[Install]
WantedBy=default.target

Re: Help using start-stop-daemon under debian (Raspberry PI)

Posted: 19 Jan 2017, 22:51
by conrad784
kulak wrote:init.d script from zeiram no longer works on raspberry pi (raspbian 4.4.38-v7+)

I think it has to do with move to systemd.


why not just use what you can read in the Wiki?
https://tt-rss.org/gitlab/fox/tt-rss/wikis/UpdatingFeeds

Re: Help using start-stop-daemon under debian (Raspberry PI)

Posted: 19 Jan 2017, 22:53
by natan
mine
If I need debug - just remove "--quiet" substring and restarting service.

Code: Select all

# /etc/systemd/system/tt-rss.service
[Unit]
Description=Tiny Tiny RSS feeds update daemon
After=network.target mysql.service postgresql.service

[Service]
ExecStart=/home/vhosts/rss.example.com/htdocs/update_daemon2.php --tasks 5 --quiet
User=www-data
Group=www-data
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target

Re: Help using start-stop-daemon under debian (Raspberry PI)

Posted: 20 Jan 2017, 10:05
by kulak
Thank you, natan

I am not an expert in custom systemd configuration and your example helped me to customize better. The following instructions were helpful as well https://www.digitalocean.com/community/ ... -and-units

I am sorry about misreading wiki page. I did not realize that "Running under systemd" is a sub header of "Update daemon", because font size difference did not stand out for me. I focused on bold "this is recommended method" and it did not occur to me that systemd is one example of that method.

Re: Help using start-stop-daemon under debian (Raspberry PI)

Posted: 23 Jan 2017, 18:26
by JamesOakley
kulak wrote:init.d script from zeiram no longer works on raspberry pi (raspbian 4.4.38-v7+)

I think it has to do with move to systemd.


I use this on a systemd system:

Code: Select all

[Unit]
Description=TinyTinyRSS Backend Daemon
After=network.target mysql.service

[Service]
User={username you want to run under}
ExecStart=/{path-to}/update_daemon2.php

[Install]
WantedBy=multi-user.target


It needs to go in /etc/systemd/system/ttrss_backend.service (or whatever you wish to name your service)