Hello

I do not know if I am on the right mailling list for this problem.

Here the problem with start-stop-daemon.

On my package tango on mentors, I need to start a service.
this one need a connection to mysql.

so I uses dbconfig to generate the /var/lib/tango/.my.cnf mode(600) for
a tango (system) user :
tango:x:114:123:Tango Server,,,:/var/lib/tango:/bin/false

All this is ok after the first installation.


In the /etc/init.d/tango-db I have :

DAEMON = /usr/lib/tango/tango5/database
DAEMON_OPTS = "1"
NAME = tango-db
echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --chuid tango:tango --background 
--make-pidfile --pidfile /var/run/$NAME.pid \ 
          --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."

but when I start the daemon, it try to connect as root and not as tango
user. what is wrong with --chuid.
(the code of the daemon use a NULL identifier for the user in the
mysql_real_connect method so the mysql connection must use the current
user, I check this by starting the daemon from root and from my
personnal account and it works. The first time it tries to connect as
[EMAIL PROTECTED] and the second times as [EMAIL PROTECTED])


Did I miss something with start-stop-daemon?

thank you and sorry for the noise if it is not the right mailling list.


Frederic

Ps: even worse

in an xterm

[EMAIL PROTECTED]:~$su root
[EMAIL PROTECTED]:~#invoke-rc.d tango-db start
It tries to connect to mysql as [EMAIL PROTECTED] instead of [EMAIL PROTECTED]


in a tty:
after login as root the same invoke-rc.d try to connect as [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to