LinHES Forums
http://forums.linhes.org/

How do I start something at boot? R6
http://forums.linhes.org/viewtopic.php?f=6&t=20285
Page 1 of 1

Author:  goofee [ Thu Sep 10, 2009 12:35 pm ]
Post subject:  How do I start something at boot? R6

I downloaded the no-ip package from the arch site. http://ftp.archlinux.org/community/os/i ... pkg.tar.gz It installs and runs fine but it doesn't restart when rebooted. The website suggests adding /usr/bin/noip2 to /etc/rc.local. I tried that with no success. Wondering if R6 has a simple file that runs at boot or if I have to make some kinda startup script? Thanks.

Author:  Too Many Secrets [ Thu Sep 10, 2009 12:51 pm ]
Post subject:  Re: How do I start something at boot? R6

goofee wrote:
I downloaded the no-ip package from the arch site. http://ftp.archlinux.org/community/os/i ... pkg.tar.gz It installs and runs fine but it doesn't restart when rebooted. The website suggests adding /usr/bin/noip2 to /etc/rc.local. I tried that with no success. Wondering if R6 has a simple file that runs at boot or if I have to make some kinda startup script? Thanks.


maybe /home/mythtv/.fluxbox/apps would serve your purpose?

Author:  langelgjm [ Thu Sep 10, 2009 1:11 pm ]
Post subject: 

Quote:
The website suggests adding /usr/bin/noip2 to /etc/rc.local

No, adding an entry to rc.local won't work (been there, done that!)

I think this is what the /sbin/add_service.sh script is for. Try
Code:
# add_service.sh noip2

as root (I don't know what the actual name of the service is, you'll need to check in /etc/sv if you don't know it).

Also this assumes the package correctly set up scripts in /etc/sv... if not you'll have to create them yourself, but first try the above.

Adding it to /home/mythtv/.fluxbox/apps as TooManySecrets suggested would work too, but then you're relying on the X server to start, you're restarting it whenever you restart X, etc.

Author:  goofee [ Thu Sep 10, 2009 1:31 pm ]
Post subject:  Re: How do I start something at boot? R6

Too Many Secrets wrote:
maybe /home/mythtv/.fluxbox/apps would serve your purpose?


That may work for now, but I'm hoping to convert this to a backend only in which case I don't think X or fluxbox will run.

langelgjm wrote:
Also this assumes the package correctly set up scripts in /etc/sv... if not you'll have to create them yourself, but first try the above.


I looked in there and nothing was created. If there's no other way then I'll have to look into making those scripts.

Author:  langelgjm [ Thu Sep 10, 2009 1:49 pm ]
Post subject: 

Quote:
I looked in there and nothing was created. If there's no other way then I'll have to look into making those scripts.

I think that well-behaved packages (i.e., those designed specifically for LinHES) are supposed to create those. I ran into a package a while back that didn't; my solution was just to copy and modify an existing subdirectory of /etc/sv.

E.g., I think I copied over /etc/sv/lighttpd to /etc/sv/moblock. Then I modified the /etc/sv/moblock/run script to point to the appropriate binary, include the appropriate flags and arguments, etc.

IIRC, after I did that, I was able to use /sbin/add_service.sh to get the moblock service to start automatically at boot. At that point you can also use the "sv start service" and "sv stop service" commands, instead of directly calling scripts out of /etc/rc.d

Author:  goofee [ Fri Sep 18, 2009 10:50 am ]
Post subject: 

langelgjm wrote:
E.g., I think I copied over /etc/sv/lighttpd to /etc/sv/moblock. Then I modified the /etc/sv/moblock/run script to point to the appropriate binary, include the appropriate flags and arguments, etc.

That was my first plan of attach when the rc.local file didn't work, but I peeked at the script for mythbackend and it looked like more than I was prepared to figure out. I tried copying the lighttpd as it seemed far simpler and at first it seemed to work. I soon found that it kept restarting itself all the time. RRD showed a 30% increase in cpu usage during that time. Found this repeating in everything.log. (I changed the address/ip)
Code:
Sep 18 01:07:48 goofee noip2[20435]: v2.1.9 daemon started with NAT enabled
Sep 18 01:07:49 mythtv noip2[20435]: **.no-ip.info was already set to *.*.*.*.
Sep 18 01:07:49 mythtv noip2[20435]: v2.1.9 daemon ended.
Sep 18 01:07:49 mythtv noip2[20438]: v2.1.9 daemon started with NAT enabled
Sep 18 01:07:49 mythtv noip2[20438]: **.no-ip.info was already set to *.*.*.*.
Sep 18 01:07:49 mythtv noip2[20438]: v2.1.9 daemon ended.
Sep 18 01:07:50 mythtv noip2[20441]: v2.1.9 daemon started with NAT enabled
Sep 18 01:07:51 mythtv noip2[20441]: **.no-ip.info was already set to *.*.*.*.
Sep 18 01:07:51 mythtv noip2[20441]: v2.1.9 daemon ended.


But when I got looking around I found that adding it to /etc/runit/1.local makes it run at boot. Seems to be similar to rc.local file in operation. I put it in there and everything seems to be working fine now. (so far)

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/