Merge lp:~ensoft-opensource/ensoft-sextant/startup-service into lp:ensoft-sextant

Proposed by Phil Connell
Status: Merged
Approved by: Patrick Stevens
Approved revision: 21
Merged at revision: 17
Proposed branch: lp:~ensoft-opensource/ensoft-sextant/startup-service
Merge into: lp:ensoft-sextant
Diff against target: 38 lines (+23/-1)
2 files modified
etc/init/sextantweb.conf (+15/-0)
setup.py (+8/-1)
To merge this branch: bzr merge lp:~ensoft-opensource/ensoft-sextant/startup-service
Reviewer Review Type Date Requested Status
Patrick Stevens Approve
Phil Connell Approve
Review via email: mp+233057@code.launchpad.net

This proposal supersedes a proposal from 2014-08-28.

Commit message

Add a 'sextantweb' service config file, to run the sextant web server.

Description of the change

Add etc/sextantweb.conf, a file to be copied to /etc/init to provide a service called sextantweb which can be started/stopped using sudo service sextantweb start.

I am very hazy on whether or not this file is correct - I've tested it a bit on a virtual machine and it didn't break anything, but I can't guarantee that it really is right (I'm a bit scared of things which run at startup). Please don't merge this until someone who knows about these things has had a look at it!

Update: fixes from testing on sandbox.

To post a comment you must log in.
Revision history for this message
ChrisD (gingerchris) : Posted in a previous version of this proposal
Revision history for this message
Patrick Stevens (patrickas) wrote : Posted in a previous version of this proposal

Two comments

Revision history for this message
Patrick Stevens (patrickas) wrote : Posted in a previous version of this proposal

It seems to work correctly without that first commented line - shall I remove it?

Revision history for this message
Simon C (slimey) wrote : Posted in a previous version of this proposal

http://en.wikipedia.org/wiki/Runlevel - your current [2-5] looks right (as much as we care, this is all a bit retro tbh)

(And yes, I would kill the tty1 comment)

Revision history for this message
ChrisD (gingerchris) wrote : Posted in a previous version of this proposal

Yeah, go for it.

On 1 September 2014 11:38, Patrick Stevens <email address hidden> wrote:

> It seems to work correctly without that first commented line - shall I
> remove it?
> --
>
> https://code.launchpad.net/~ensoft-opensource/ensoft-sextant/startup-service/+merge/232532
> Your team Ensoft Open Source is requested to review the proposed merge of
> lp:~ensoft-opensource/ensoft-sextant/startup-service into lp:ensoft-sextant.
>

Revision history for this message
Phil Connell (pconnell) wrote : Posted in a previous version of this proposal

I'd suggest mirroring what endroid does, for a bit of consistency (since we know it works!):

- Move to etc/init/sextantweb.conf in the repo.
- Add description and author fields.
- Consider using more descriptive triggers for start on/stop on.
- Starting/stopping on networking being available seems like a decent idea, since it's a bit useless otherwise.

http://bazaar.launchpad.net/~ensoft-lander/endroid/trunk/view/head:/etc/init/endroid.conf

review: Needs Fixing
Revision history for this message
Patrick Stevens (patrickas) wrote : Posted in a previous version of this proposal

> I'd suggest mirroring what endroid does, for a bit of consistency (since we
> know it works!):
>
> - Move to etc/init/sextantweb.conf in the repo.
> - Add description and author fields.
> - Consider using more descriptive triggers for start on/stop on.
> - Starting/stopping on networking being available seems like a decent idea,
> since it's a bit useless otherwise.
>
> http://bazaar.launchpad.net/~ensoft-
> lander/endroid/trunk/view/head:/etc/init/endroid.conf
Sounds sensible - I've done that. Didn't think of looking in Endroid!

Revision history for this message
Phil Connell (pconnell) wrote :

Approved, pending Patrick approving my changes.

review: Approve
Revision history for this message
Patrick Stevens (patrickas) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'etc/init'
2=== added file 'etc/init/sextantweb.conf'
3--- etc/init/sextantweb.conf 1970-01-01 00:00:00 +0000
4+++ etc/init/sextantweb.conf 2014-09-02 13:34:00 +0000
5@@ -0,0 +1,15 @@
6+# This service runs sextant web on startup until shutdown,
7+# using whatever configuration file sextant is currently using.
8+
9+description "Sextant Web server"
10+author "Ensoft Limited"
11+
12+start on net-device-up
13+stop on stopping network
14+stop on starting shutdown
15+
16+respawn
17+script
18+ export SEXTANT_CONFIG=/etc/sextant.conf
19+ exec sextant web
20+end script
21
22=== modified file 'setup.py'
23--- setup.py 2014-09-01 10:18:31 +0000
24+++ setup.py 2014-09-02 13:34:00 +0000
25@@ -23,7 +23,14 @@
26 # somehow before using Sextant; we recommend pip.
27 install_requires=['twisted'],
28 #install_requires=['neo4jrestclient', 'twisted'],
29- package_data={'resources': ['sextant/web/*'], 'etc': ['*.conf']},
30+ package_data={
31+ 'resources': ['sextant/web/*'],
32+ 'etc': ['*.conf', 'init/*'],
33+ },
34+ data_files=[
35+ ('/etc', ['etc/sextant.conf']),
36+ ('/etc/init', ['etc/init/sextantweb.conf']),
37+ ]
38 )
39
40

Subscribers

People subscribed via source and target branches