Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Stiven on February 23, 2010, 03:15:40 AM

Title: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 23, 2010, 03:15:40 AM
Hi everybody,

My question is in the subject.

Thanx for your help.
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: janet on February 23, 2010, 04:44:39 AM
Stiven

Not sure you need to undo it.

To see current configuration do
config show httpd-e-smith
To see status do
sv s /service/httpd-e-smith
To restart do
sv t /service/httpd-e-smith

A reboot probably would have restarted the service, if it was not running
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: piran on February 23, 2010, 09:35:05 AM
http://wiki.contribs.org/Service_Control
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 23, 2010, 12:31:02 PM
http://wiki.contribs.org/Service_Control

Could you explain me how to access this contrib without apache running ?
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: piran on February 23, 2010, 12:42:29 PM
Could you explain me how to access this contrib without apache running ?
wget http://wiki.contribs.org/Service_Control
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: janet on February 23, 2010, 12:56:12 PM
piran

Quote
wget http://wiki.contribs.org/Service_Control

That's incorrect, the wiki article says
wget "http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=329"
yum localinstall smeserver-service_control-2.0-1.noarch.rpm
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: piran on February 23, 2010, 01:02:32 PM
OP asked how to access the contrib...
wget http://wiki.contribs.org/Service_Control
...accesses the contrib.
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 23, 2010, 01:18:52 PM
Actually, my question was : how can I use service control without server-manager ?
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: piran on February 23, 2010, 01:27:13 PM
Actually, my question was : how can I use service control without server-manager ?
You didn't ask that originally.
My crystal ball is cloudy today.
I never use SME without server-manager so I am unable to help.
You asked for help in the original post.
I know nothing of your circumstances or problems.
A service control contrib on your SME may help avert your situation.
I thought it helpful and you asked for help.
If you don't consider it helpful then just ignore it.
Busy.
Bye
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: janet on February 23, 2010, 01:30:04 PM
Stiven

I don't understand why you don't use the commands I gave earlier ?

To see current configuration for a service do
config show servicename
eg
config show httpd-e-smith

To see configuration of all services and settings do
config show |more

To see status of a particular service do
sv s /service/httpd-e-smith

To restart service do
sv t /service/httpd-e-smith
(which does a terminate and as most services are supervised on sme then it will automatically restart).

Alternatively do
sv u /service/httpd-e-smith
which will bring a stopped service up

Replace the servicename as required

By the way
apache
is the web server,
squid
is your web proxy
and
httpd-admin
is what gives you server manager access
httpd-e-smith
is what gives you web access
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 23, 2010, 01:49:39 PM
Thanx for you help mary

# config show httpd-e-smith
httpd-e-smith=service
    SSLv2=enabled
    TCPPort=80
    access=public
    status=enabled


# sv u /service/httpd-e-smith
fail: /service/httpd-e-smith: unable to change to service directory: file does not exist

# sv s /service/httpd-admin
run: /service/httpd-admin: (pid 4565) 1953s, normally down; run: log: (pid 2952) 2135s


I still unable to access  server manager

Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: CharlieBrady on February 23, 2010, 02:19:14 PM
# sv u /service/httpd-e-smith
fail: /service/httpd-e-smith: unable to change to service directory: file does not exist

Try:

ln -s /var/service/httpd-e-smith /service
sleep 5
sv u /service/httpd-e-smith

I'm curious - why did you do "service httpd-e-smith svdisable"?
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: janet on February 23, 2010, 02:28:34 PM
Stiven

Quote
I still unable to access  server manager

config show httpd-admin

sv u /service/httpd-admin

sv s /service/httpd-admin
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stefano on February 23, 2010, 03:52:31 PM
Hi everybody,

My question is in the subject.

Thanx for your help.

go to /service directory and give
Code: [Select]
ln -s /var/service/httpd-e-smith
service httpd-e-smith start

should work, but sincerely I don't know how to recreate /service/httpd-e-smith/log directories and their files

NOTE:
1) why did you call such a command? what did you trying to achieve?
2) next time, please, look into /etc/rc.d/init.d/ scripts.. you'll find that:

- httpd-e-smith is a symbolic link to daemontools
Code: [Select]
lrwxrwxrwx  1 root root   11 Dec 30 11:52 httpd-e-smith -> daemontools

and then, looking into daemontools script, you'll find what happen if you call svdisable flag
Code: [Select]
# This function not only shuts the service down, but removes the /service
# symlink and shuts down the logger. This should only be used during an
# uninstall of the service in question.
svdisable()
{
    /bin/echo -n $"Disabling $prog:"
    stop $1
    cd $1 && rm -f $1
    dirs=.
    if [ -e log ]; then
        dirs="$dirs ./log"
    fi
    /usr/bin/sv d $dirs
    /usr/bin/sv x $dirs
    if [ $? -ne 0 ]; then
        failure "Disabling $prog"
    else
        success "Disabling $prog"
    fi
    /bin/echo
}

Edit: you already have answers  :-)
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 27, 2010, 12:40:48 PM
It just does work fine !!!!

Thanx a lot Stefano.
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: Stiven on February 27, 2010, 12:46:57 PM
Mary,

Thank you for trying helping me.

It seems that server-manager doesn't work without httpd-e-smith running. I think it needs httpd-admin AND httpd-e-smith running together.

Please anyone tell me if I'm wrong.
Title: Re: How to undo "service httpd-e-smith svdisable"
Post by: CharlieBrady on February 27, 2010, 05:33:06 PM
It seems that server-manager doesn't work without httpd-e-smith running. I think it needs httpd-admin AND httpd-e-smith running together.

Correct.