Add new service - PostgreSQL to Services list

savajr

Verified User
Joined
May 8, 2005
Messages
8
I want to add new service - PostgreSQL to Services list.
This is require for me to at least be able to start/stop service.

How this can be done?
 
I'm a little confused as to how to deploy this. Could someone give me an example for say ClamAV ?
 
rldev,
You would just use the service name. So for example, MySQL's service name is "mysqld" as such the entry in the list if "mysqld=ON"
you would do the same thing for clamAV. If the service name was clamavd you would do something like "clamavd=ON"
 
jmstacey said:
savajr,
DirectAdmin would need to be restarted.

Thank you for quick responce, I did as you suggested.

However after adding postgresql as service in /usr/local/directadmin/data/admin/services.status and restarting DirectAdmin it still doesn't appear in services list in admin panel. All the other services appear normally, this one doesn't appear.
The file services.status was sorted after DA restart, service is there, however isn't shown.

System logs (system and DA) don't show anything related to this problem.

Please suggest.
 
I got this to work for clamd but could not get it to work for spamd(Spam Assasin)

error:

spamd: unrecognized service

Yet the page shows all of the processes running for spamd.
 
Isn't DA supposed to report down services in this list and try to restart them. I just tried a test with clamd and it was not restarted by DA. I didn't even receive any notification from DA. Am I wrong on this? come to think of it, I don't see DA trying to restart any services I take down.
 
Last edited:
I forgot DA will not restart a service if you stop it within the service monitor.

Still can't get spamd to work though.
 
jmstacey said:
rldev,
You would just use the service name. So for example, MySQL's service name is "mysqld" as such the entry in the list if "mysqld=ON"
you would do the same thing for clamAV. If the service name was clamavd you would do something like "clamavd=ON"

Any suggestions please?
have line i services file looking like postgresql=ON
Have service called "postgresql", checked it.

That service doesn't appear in services list in DA webinterface.
 
rldev said:
I would imagine it would be more like pgsqld=ON


tried
pgsqld=ON
postgresql=ON
postmaster=ON

in /etc/rc.d/
it is called "postgresql"

here is my file

directadmin=ON
exim=ON
httpd=ON
mysqld=ON
named=ON
pgsqld=ON
postgresql=ON
postmaster=ON
proftpd=ON
sshd=ON
vm-pop3d=ON


Then restarted DirectAdmin service using services page inweb interface and from shell also using "service...".

doesn't appear.
Hard thing...


Is there anything else I should check?
 
I think the service is called "postgresql" but the actual master process is called "postmaster" or some such.

There are a lot of commands that will fall under this kind of operation and thus can't be monitored (courier-imap, e.g.).

Ideally, the user should be able to specify the name of the process in addition to the name of the service for monitoring.
 
rldev said:
can you "ps awx|grep postgresql" ?

# ps awx|grep postgresql
24491 pts/3 D 0:00 grep postgresql

but
# ps awx|grep postgres
4804 ? S 0:16 postgres: stats buffer process
4805 ? S 0:10 postgres: stats collector process
24655 pts/3 S 0:00 grep postgres


also

# service postgresql status
postmaster (pid 4805 4804 4787) is running...

tried restarting it and DA, few times.

I know what I do, in short.
Just don't know much about DA habbits/manners.



After latest message, also added "postgres"

now services file looks like
pgsqld=ON
postgresql=ON
postmaster=ON
postgres=ON

no one appears
 
The service name and the executable name have to match for this work.

If you change the name of the init script to "postmaster" and then use

postmaster=ON

I think that DA will monitor it and restart it.

Of course, upgrades, etc. will break this.

You shouldn't need to restart DA to pick this up... are you sure you're running 1.24 or 1.24.1?
 
Last edited:
ballyn said:
Sorry, that last post may be a bit misleading.

If DA is calling "service <servicename> status" to determine status then the service just has to support a "status" call (some don't).

The correct setting in this case is

postgresql=ON

You shouldn't need to restart DA to pick this up... are you sure you're running 1.24 or 1.24.1?

ops, I have 1.23.5
Should I upgrate to have this working?
 
I modified my previous post after looking at the process a bit...

Yes, you'll have to upgrade to 1.24 for DA to even see your changes to the file.
 
ballyn said:
I modified my previous post after looking at the process a bit...

Yes, you'll have to upgrade to 1.24 for DA to even see your changes to the file.

Thank you for support,
sorry for mess with version.

Will get back here after upgrade.
 
Back
Top