LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-03-2004, 12:03 PM   #1
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,104

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
add service to "system services list"?


two questions about the following script i created

Code:
#!/bin/bash
test=$1
if [ "$test" = "start" ]
    then
    /usr/local/sbin/LCDd -d MtxOrb&
    sleep 1
    /usr/bin/mtxorb /dev/lcd
    sleep 1
    /usr/local/bin/lcdproc K -d
else
    if [ "$test" = "stop" ]
	then
	killall lcdproc
	killall LCDd
    else
	if [ "$test" = "restart" ]
	    then
	    killall lcdproc
	    sleep 1
	    killall LCDd
	    sleep 1
	    /usr/local/sbin/LCDd -d MtxOrb&
	    sleep 1
	    /usr/bin/mtxorb /dev/lcd
	    sleep 1
	    /usr/local/bin/lcdproc K -d
	else
	    echo restart start or stop
	fi
    fi
fi
the purpose is to start and stop LCDd and a clock lcdproc client

first question, how could this perhaps be made more efficient

second of all, i put it in /etc/rc.d/init.d and linked it to the proper names in the /etc/rc.d/rcX.d directories, how do i get it to appear under "system services" within the "setup" program so it can start and stop on runlevel change?

opps, third, how do i get it to say
starting lcd [ OK ] or [ FAIL ]
and
stoping lcd [ OK ] or [ FAIL ]

when invoked?

Last edited by frieza; 04-03-2004 at 12:30 PM.
 
Old 04-03-2004, 01:15 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
the file /etc/rc.d/rc.sysinit has all that ok/failed stuff,

shuffle it into there or put it into rc.5.
 
Old 05-05-2004, 11:51 AM   #3
tkdave
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
chkconfig --add servicename

that rc[X].d stuff is for chkconfig
the setup program is a front for chkconfig
try...

chkconfig --add servicename

where servicename is the name of the script you added to /etc/rc.d/init.d

not sure about the [ok] stuff.

chkconfig --help is useful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add service remotly "yp" RH 7.2 sgoldman Linux - Newbie 2 09-17-2005 12:27 PM
add "Artist" and "Album Title" to mp3 files powah Linux - Software 2 04-05-2005 03:04 AM
User "list" running process "python" TroelsSmit Linux - Newbie 2 02-22-2005 04:55 AM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
How to add a system service in "ntsysv" list? yuzuohong Linux - General 1 07-15-2002 07:01 PM


All times are GMT -5. The time now is 10:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration