Koozali.org: home of the SME Server

How to undo "service httpd-e-smith svdisable"

Offline Stiven

  • ***
  • 53
  • +0/-0
How to undo "service httpd-e-smith svdisable"
« on: February 23, 2010, 03:15:40 AM »
Hi everybody,

My question is in the subject.

Thanx for your help.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #1 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
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.


Offline Stiven

  • ***
  • 53
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #3 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 ?

Offline piran

  • *****
  • 502
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #4 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

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #5 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
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline piran

  • *****
  • 502
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #6 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.

Offline Stiven

  • ***
  • 53
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #7 on: February 23, 2010, 01:18:52 PM »
Actually, my question was : how can I use service control without server-manager ?

Offline piran

  • *****
  • 502
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #8 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

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #9 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
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stiven

  • ***
  • 53
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #10 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


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #11 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"?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #12 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
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #13 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  :-)
« Last Edit: February 23, 2010, 03:58:30 PM by Stefano »

Offline Stiven

  • ***
  • 53
  • +0/-0
Re: How to undo "service httpd-e-smith svdisable"
« Reply #14 on: February 27, 2010, 12:40:48 PM »
It just does work fine !!!!

Thanx a lot Stefano.