Nikki81
Posts: 88
Joined: Sat May 18, 2013 9:36 pm
Location: Manchester,Uk

How to start a daemon at boot in openelec ?

Wed Nov 27, 2013 12:12 pm

I have built gamaral's rpi power switch http://guillermoamaral.com/read/rpi-psu-r3/ but am having trouble getting the daemon to start at boot. will i have to put the script in place and then rebuild it ?

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: How to start a daemon at boot in openelec ?

Wed Nov 27, 2013 8:08 pm

Check out the source code of the shell script: [url]https://github.com/gamaral/rpi-pwrbtn/b ... _client.sh[/code]

Relevant excerpt from the source:

Code: Select all

## INSTALL ####################################################################
#
# Simply run as this script as a daemon on system start.
#
# Here's an example of how you could do just that on target.
#
# su # become root
# cp rpi-psu_client.sh /usr/local/bin
# chmod 700 /usr/local/bin/rpi-psu_client.sh
# echo "null::once:/root/rpi-psu_client.sh" >> /etc/inittab
#

Nikki81
Posts: 88
Joined: Sat May 18, 2013 9:36 pm
Location: Manchester,Uk

Re: How to start a daemon at boot in openelec ?

Wed Nov 27, 2013 9:11 pm

that was the first thing i tried it is not letting me get root

Nikki81
Posts: 88
Joined: Sat May 18, 2013 9:36 pm
Location: Manchester,Uk

Re: How to start a daemon at boot in openelec ?

Fri Nov 29, 2013 3:59 pm

Ive been trying things for the last two days and Ive still got the problem that every time i try and edit things to get the script to run i get the error that it is a read only file system

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: How to start a daemon at boot in openelec ?

Fri Nov 29, 2013 4:01 pm

We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

User avatar
RaTTuS
Posts: 10574
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: How to start a daemon at boot in openelec ?

Fri Nov 29, 2013 4:30 pm

you need to remount it as read - write
somethign like
mount /flash -o remount,rw
then you can edit the files
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “General discussion”