LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-16-2004, 04:12 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
can't startup the service when server restart


I tried to link the service to the start-up ,

#ln -s /usr/local/apache/bin/httpd /etc/init.d
# pwd
/etc/init.d
#ll /usr/local/apache/bin/httpd
lrwxrwxrwx 1 root root 27 Oct 16 15:50 httpd -> /usr/local/apache/bin/httpd
 
Old 10-16-2004, 05:16 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that won't work. you do not want a link to the actual executable, but a service control script that references it indirectly. for example:
Code:
#!/bin/sh
# Begin /etc/init.d/

source /etc/init.d/functions

case "$1" in
        start)
                echo -n "Starting giftd..."
                daemon su - gift -c \"giftd -d\"
                echo
                ;;

        stop)
                echo -n "Stopping giftd..."
                killproc giftd
                echo
                ;;

        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;

        status)
                status giftd
                ;;

        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
        ;;

esac

# End /etc/init.d/
but that's not for apache, which normally has a much longer script. these scripts are also frequently distro dependent, and i've not seen a script for erm.... fasf linux (please fill it in *properly* it's there for a reason)
 
Old 10-16-2004, 05:32 AM   #3
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
What distribution are you using?
 
  


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
Can't SSH until restart service Da Puff Mandriva 4 09-14-2005 09:51 PM
Automatically Restart Service tulip4heaven Linux - General 1 04-23-2005 03:11 AM
auto restart service st3reo Linux - Newbie 4 12-07-2004 01:46 PM
How to restart a service in slackware? echojihui Slackware 7 08-31-2004 09:03 PM
service network restart perry Linux - Networking 2 12-15-2003 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:19 PM.

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