i'm configuring my debian server and i don't manage to start a daemon correctly.
In order to start, my daemon has to find the Postgresql socket (located at /var/run/postgresql/.s.PGSQL.5432), but the daemon doesn't start. I checked the logs, it's written:
An error occured while loading the map layer: could not connect to server: No such file or directory. Is the server running locally and accepting connections n Unix domain socket '/var/run/postgresql/.s.PGSQL.5432' ?
At first, i used update-rc.d mydaemon defaults
, and since the result was like that, i've tried update-rc.d mydaemon start 30 2 3 4 5 . stop 30 0 1 6 .
, but the result is still the same.
I'm using Debian 6.0.6 (Squeeze), and postgre "rc.d start level" seems to be 23 since ls /etc/rc3.d | grep postgre
returns S23postgresql
.
rc.d script metainfo:
# Provides: mydaemon
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mydaemon daemon
# Description: mydaemon daemon.
Can anyone help me?
Thanks.
(and sorry for my english)