View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Oct 23, 2010 11:13 am 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
Hi all,

I recently upgraded from R5.5 to LinHES 6.03 last night, and have a few questions.

(1)

I have a simple bash script/daemon that has the old standard start/stop/restart options within in. Back in the knoppmyth days I would just put this into /etc/init.d, and run update-rc.d on it. However, I can't seem to find the right place/commands for LinHES (Arch).

Looking here, I assumed I could use add_service.sh. But it seems that the script needs to be in a new format: a directory in /etc/sv, with sub-scripts like "run", "finish", etc, within that directory.

I'd really prefer to keep the original script as-is, and not have to parse it into these sub scripts that have new calls (like stat_runit). Is there any way to add just a single script/daemon to the startup routine?

(2)

I am also confused as to which is called on startup, /etc/sv OR /etc/rc.d (or both?). I noticed some programs, like sshd, live in BOTH directories but have different commands. As in, /etc/rc.d/sshd is different from /etc/sv/sshd/run. Which is used?


Thanks for helping me clarify this new procedure. Guess I am far too used to the "old ways"


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 23, 2010 12:34 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
there is a built in option for quit reboot and shutdown of the computer. Are you talking about starting and stopping the backend?

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 23, 2010 12:36 pm 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
The script isn't to start/stop/restart the computer, it is to start/stop/restart the program.

For example, /etc/rc.d/sshd has a "start/stop" command in it. But I'm not sure where sshd is called upon startup, /etc/rc.d, or /etc/sv.

But even the start/stop/restart aside, I'm trying to figure out how to turn a standard bash script/daemon into something that boots on startup in linhes. It seems it "add_service.sh" can only be used on things that conform to the directory structure found under /etc/sv.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 27, 2010 7:35 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
yep over my head
bumped

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 27, 2010 8:07 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
The system boot is controlled by "runit". For more detail, try:
Code:
man runit

I haven't done this on LinHES yet (not had a need) but if you look in /etc/runit you will see stages 1, 2, and 3 per man. Looking at Stage 1 script it calls "1.local" which is where you apparently add your own scripts.

worth a try!


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 139 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu