Suppose I have several applications, which can be started through /etc/init.d/twistd. Each one need unique pid-file and own conf.d file. I propose to change literal `twistd` to ${SVCNAME} to make it possible using symlinks. Reproducible: Always
Created attachment 186177 [details, diff] twistd.init patch
How did you know I wanted to do something like that ? :P although I was thinking more of something similar to conf.d/net and init.d/net.<device> what do you think?
(In reply to comment #2) > How did you know I wanted to do something like that ? :P Maybe this a right way ;) > although I was thinking more of something similar to conf.d/net and > init.d/net.<device> what do you think? Yes, i mean the same thing: 1 make symlink on init.d/twistd (cd /etc/init.d && ln -s twistd myappname) 2 write config, for example echo "TWISTD_OPTS="--logfile /var/log/sqlpt.myappname --python /path/to/myappname.tac" > /etc/conf.d/myappname 3 run /etc/init.d/myappname start or do you want some naming scheme like init.d/twistd.myapp? I don't see a problem here.
i think i'd prefer twistd.myapp ;)
(In reply to comment #4) > i think i'd prefer twistd.myapp ;) > and what's wrong with my proposition?
Created attachment 304963 [details, diff] Improved patch. This patch also allow specifying the pidfile name explicitly. This will support arbitrary init.d names (including twistd.service_name).
This bug report was open in 2009 and this contribution has made its way into the tree yet. Feel free to reopen if you're still interested in improving twisted's init script. Closing.