Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Commandline option to make it write pid file (and change user)  (Read 5211 times)

0 Members and 1 Guest are viewing this topic.

GurliGebis

  • Guest

It would be nice to be able to pass these options to the services executable:

-pidfile /var/run/anope.pid # To make it write a pid file for later stopping of the service.

-chuid anope # To run the init script as root, and make anope change user to another user (etc. anope).

Having those two options would make it possible to avoid using start-stop-daemon. (It's causing some problems in the init script I'm writing for Anope on Gentoo Linux)
Logged

katsklaw

  • Guest
(No subject)
« Reply #1 on: August 29, 2006, 10:15:01 PM »

well it writes a pid file so it's location isn't really relevent so long as the user anope runs as has permission to rw to it. Secondly, services nor any irc related binary should ever be run as root. It's a very bad idea. If you insist on  running it in this fashon it would be easier to write your script to su the user anope runs as using the su command.

ie: su -c '/home/bob/services/services' - bob
Logged

GurliGebis

  • Guest
(No subject)
« Reply #2 on: August 29, 2006, 10:29:45 PM »

Okay, hmm, can I define where it writes the pid file? (I want to force it to write it to /var/run/anope.pid)
Logged

katsklaw

  • Guest
(No subject)
« Reply #3 on: August 29, 2006, 10:52:49 PM »

PIDFile directive in the services.conf file
Logged

GurliGebis

  • Guest
(No subject)
« Reply #4 on: August 29, 2006, 10:58:13 PM »

Ahh, cool, thanks :)
Logged
Pages: [1]   Go Up