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

Proposed by Patrick Stevens
Status: Superseded
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
Phil Connell Needs Fixing
Review via email: mp+232532@code.launchpad.net

This proposal has been superseded by a proposal from 2014-09-02.

Commit message

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.

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!

To post a comment you must log in.
13. By Patrick Stevens <email address hidden>

Update setup.py to include the sextantweb.conf file

Revision history for this message
ChrisD (gingerchris) :
Revision history for this message
Patrick Stevens (patrickas) wrote :

Two comments

Revision history for this message
Patrick Stevens (patrickas) wrote :

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

Revision history for this message
Simon C (slimey) wrote :

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 :

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.
>

14. By Patrick Stevens <email address hidden>

Remove apparently useless comment line from sextantweb.conf startup script

15. By Patrick Stevens <email address hidden>

Merge trunk changes

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

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
16. By Patrick Stevens <email address hidden>

Start SextantWeb on network availability and stop on shutdown or on network-stop, rather than starting on startup and stopping on shutdown. Add description and author fields to init file, and move to etc/init/sextantweb.conf.

Revision history for this message
Patrick Stevens (patrickas) wrote :

> 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!

17. By Patrick Stevens <email address hidden>

Merge trunk

18. By Phil Connell <email address hidden>

Fix installation of webservice config in setup.py

19. By Phil Connell <email address hidden>

Merge

20. By Phil Connell <email address hidden>

Install sextant.conf to /etc as well as etc/ in the sextant package folder

21. By Phil Connell <email address hidden>

Make sure webservice uses global config file

By default, path/to/python/pkgs/dist-pkgs/sextant-xyz/etc/sextant.conf is used
instead.

Unmerged revisions

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:32:37 +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:32:37 +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