LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-31-2007, 02:11 AM   #1
packets
Member
 
Registered: Oct 2005
Posts: 339

Rep: Reputation: 32
how to put my script in bootup


I'm new to Solaris. I have setup a Mail server using java as an MTA and installed Clamav for antivirus. I copy the script of clamd to /etc/init.d.
I usually up the clamd using /etc/init.d/clamd start


The question is how can I put the script in boot mode? When I restart, it will automatically run and no need to login just to up the clamav

How can I know the current level mode?
 
Old 10-31-2007, 03:03 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
You are half way there, you have a startup script in /etc/init.d

Check which runlevel you use(example):
Code:
who -r
run-level 2 2007-10-28 17:02
If as in the example this runs in level 2 then as root:

Code:
ln –s /etc/init.d/clamd /etc/rc2.d/S99clamd
 
Old 10-31-2007, 03:07 AM   #3
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
Thanks for the reply
 
Old 10-31-2007, 12:27 PM   #4
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
Which version of Solaris are you using?

If supported, I would suggest writing a service manifest for the service to be managed by SMF. The system documentation is sufficient to easely complete the task.

Regards,
Enrico.
 
  


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
.. how to put a script to '/etc/rc.d/rc.*? emil+ Slackware 11 02-24-2006 02:27 PM
Where to put iptables script? tentolga Linux - Networking 9 08-28-2004 07:39 AM
bootup script? andymadigan Debian 2 08-04-2004 05:32 PM
PPPD how do I know what to put in the script? jimdaworm Slackware 4 02-29-2004 12:02 PM
Where to put program/script cmfarley19 Linux - General 5 02-26-2004 01:23 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration