Skip to content

Commit

Permalink
testing upstart
Browse files Browse the repository at this point in the history
  • Loading branch information
seryoni committed Apr 25, 2017
1 parent af379a4 commit 5f2e55c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 1 addition & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ python setup.py install
deactivate

# Setup the jumper agent service
cp /opt/jumper-logging-agent/jumper-agent.template /opt/jumper-logging-agent/jumper-agent.service
echo "ExecStart=/opt/jumper-logging-agent/venv/bin/python2.7 /opt/jumper-logging-agent/agent_main.py" >> /opt/jumper-logging-agent/jumper-agent.service
cp /opt/jumper-logging-agent/jumper-agent.service /lib/systemd/jumper-agent.service
cp /opt/jumper-logging-agent/jumper-agent.template /lib/systemd/jumper-agent.service
ln -s /lib/systemd/jumper-agent.service /etc/systemd/system/jumper-agent.service

# Start the jumper agent service
Expand Down
9 changes: 9 additions & 0 deletions jumper-agent-init.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description "Jumper Agent Service"
author "jonathan@jumper.io"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

exec /opt/jumper-logging-agent/venv/bin/python2.7 /opt/jumper-logging-agent/agent_main.py
1 change: 1 addition & 0 deletions jumper-agent.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ WantedBy=multi-user.target

[Service]
Type=simple
ExecStart=/opt/jumper-logging-agent/venv/bin/python2.7 /opt/jumper-logging-agent/agent_main.py

0 comments on commit 5f2e55c

Please sign in to comment.