Anope IRC Services

Anope Development => Feature Requests => Topic started by: GurliGebis on August 29, 2006, 09:36:48 PM

Title: Commandline option to make it write pid file (and change user)
Post by: GurliGebis on August 29, 2006, 09:36:48 PM
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)
Title:
Post by: katsklaw 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
Title:
Post by: GurliGebis 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)
Title:
Post by: katsklaw on August 29, 2006, 10:52:49 PM
PIDFile directive in the services.conf file
Title:
Post by: GurliGebis on August 29, 2006, 10:58:13 PM
Ahh, cool, thanks :)