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

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
kaice
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 04:28

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

Postby kaice » 27 May 2013, 14:15

Hi,

I am really new to Linux and stuff, but with the help of a friend I managed to run tt-rss on my raspberry Pi. Everything works fine, but my skills are not enough to run the update daemon with the start-stop-daemon function.
I would be deeply grateful, if somebody could explain to me in some steps how I can run the update daemon with the recommended start-stop-daemon. Plus, I would have it run automatically everytime I reboot my Pi.

I found some threads here in the forum, but most of them are to hard for me to follow.

Thanking you in anticipation
Kai

User avatar
PerryWerneck
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 13 May 2013, 16:21
Location: Brasília - DF - Brasil

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

Postby PerryWerneck » 27 May 2013, 14:55


kaice
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 04:28

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

Postby kaice » 27 May 2013, 15:21

Thank you. I will try it when I am at home later.
There is one question I still want to have answered: Why does it need a whole script? I thought it would be enough to use "start-stop-daemon xxx update.php xxx" or something like that. What is the advantage of this script?

User avatar
PerryWerneck
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 13 May 2013, 16:21
Location: Brasília - DF - Brasil

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

Postby PerryWerneck » 27 May 2013, 16:42

Hi,

Well, you can always use start-stop from command line but, without the init script you'll have to run the command manually every time the machine boots. Using the standard /etc/init.d script you can manage the update service using the GUI service tools just like the windows service manager.

Not sure if the commands below will work on debian (I'm an opensuse's user), but, after saving the script as /etc/init.d/ttrss you can use the following commands to manage it from command line:

sudo insserv ttrss - Activate the service to run every time the machine boots
sudo service ttrss start - Start the update service
sudo service ttrss stop - Stop the update service

If the service commands doesn't work the direct calls will work:

sudo /etc/init.d/ttrss start - Start the update service
sudo /etc/init.d/ttrss stop - Start the update service

A few notes:

* I just searched google for insserv on raspberry, and, according to the thread in http://www.raspberrypi.org/phpBB3/viewtopic.php?t=7395 the "insserv" command is available in it.

* I Asked to another raspberry owner and, according to him, theres an application named "BUM" (Boot up manager - http://www.ubuntugeek.com/boot-up-manag ... ditor.html) who runs on raspberry to manage system services.

zeiram
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 29 Apr 2013, 17:04

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

Postby zeiram » 27 May 2013, 20:15

Last edited by zeiram on 27 May 2013, 20:25, edited 1 time in total.

zeiram
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 29 Apr 2013, 17:04

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

Postby zeiram » 27 May 2013, 20:19


kaice
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 04:28

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

Postby kaice » 28 May 2013, 11:50

@zeiram
I did everything as you posted, but when I access ttrss via browser it is still telling me "Update daemon is not running".
I changed the path and I made /etc/init.d/tt-rss executable before using insserv.
sudo service tt-rss start did not help, neither a reboot did.
What did I do wrong?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

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

Postby fox » 28 May 2013, 13:02

tt-rss checks for the daemon lockfile in LOCK_DIRECTORY, maybe it can't create it there.

kaice
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 04:28

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

Postby kaice » 28 May 2013, 13:04

Addendum:
A friend of mine fixed the problem by adding "rm /var/www/ttrss/lock/*" at the beginning of your script.

zeiram
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 29 Apr 2013, 17:04

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

Postby zeiram » 28 May 2013, 13:54

You can verify if the daemon is running (and probably check its error messages if it can't start) in the file /var/log/tt-rss-update.log

You're right, the /etc/init.d/tt-rss should be executable, I forgot this step in my instructions.

For now, that's all I can do (this, and assuring you it's running without problems on my RPi with the files I've posted ;-) )... I'll have a look once I get home.

User avatar
PerryWerneck
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 13 May 2013, 16:21
Location: Brasília - DF - Brasil

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

Postby PerryWerneck » 28 May 2013, 14:36


kaice
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 Mar 2013, 04:28

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

Postby kaice » 28 May 2013, 16:07

Hi,
cannot check at the moment, but it is working for me right now. Just needed to wipe /var/www/ttrss/lock/* everytime the script starts. Maybe it's a permission problem with this path.

Edit: Thank you all very much!

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

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

Postby sleeper_service » 29 May 2013, 01:13


blackdragon1
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 24 Oct 2013, 12:30

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

Postby blackdragon1 » 31 May 2015, 17:43

Hi just got a Pi and don't have much experience so I just wanna give some help (not waste hours (it was more like half an hour) with my mistakes) to anyone that might come across this thread.
Currently using Raspbian.

My first mistake:
When running insserv kept getting and error of "incomplete LSB comment.". When copied the script from zeiram, to txt file there was leading whitespace. Yeah, didn't know it shouldn't have any. Solution was to remove leading whitespace.
My second mistake:
After the previous everything went fine, I tried to test the service stop and start but got this instead "env: /etc/init.d/tt-rss: No such file or directory". This one I liked, since I made the file on windows EOL (End-of-line) was on windows. Solution was to open the file on notepad++ went to Edit > EOL Conversion > Unix/Osx format and saved.

And as a bonus, this makes the file executable:
sudo chmod +x /etc/init.d/tt-rss

Thanks for the script zeiram! It's working like a charm.

kulak
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 05 Jan 2016, 13:50

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

Postby kulak » 19 Jan 2017, 09:27

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.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 10 guests