I can set the filename of the .pid
file by supplying the --pidfile=
option to twistd
. Is there a way I can specify it inside a .tac
file instead?
Context:
My twisted service is a bot that plays a game and accepts multiple parameters like his name, skill level, etc. I am creating a .tac
file for each bot (multiple bots can run concurrently) so that each specific bot always has the same parameters and I can launch it with twisted -y botname.tac
.
I'd like the pid file to be of the form <bot_nick>.pid
so that different bots don't use the same pid file and also because I can see which both are running just by listing the pid files. Is there a way I could set this in the .tac
file itself or do I have to always manually specify it in the twistd command line options like twistd -y bot1.tac --pidfile=bot1.pid
?