Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263687 - Generalize the init script for dev-python/twisted
Summary: Generalize the init script for dev-python/twisted
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Thomas Raschbacher
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 04:33 UTC by Dmitri Bogomolov
Modified: 2016-10-12 08:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
twistd.init patch (twistd.init.patch,997 bytes, patch)
2009-03-25 04:35 UTC, Dmitri Bogomolov
Details | Diff
Improved patch. (twistd.init.patch,1.17 KB, patch)
2012-03-12 01:31 UTC, Tom Prince
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Bogomolov 2009-03-25 04:33:37 UTC
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
Comment 1 Dmitri Bogomolov 2009-03-25 04:35:22 UTC
Created attachment 186177 [details, diff]
twistd.init patch
Comment 2 Thomas Raschbacher gentoo-dev 2009-03-27 09:00:24 UTC
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?
Comment 3 Dmitri Bogomolov 2009-03-27 09:38:22 UTC
(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.

Comment 4 Thomas Raschbacher gentoo-dev 2009-04-09 12:00:29 UTC
i think i'd prefer twistd.myapp ;)
Comment 5 Dmitri Bogomolov 2009-04-17 18:32:50 UTC
(In reply to comment #4)
> i think i'd prefer twistd.myapp ;)
> 

and what's wrong with my proposition?
Comment 6 Tom Prince 2012-03-12 01:31:29 UTC
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).
Comment 7 Patrice Clement gentoo-dev 2016-10-12 08:55:35 UTC
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.