summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-10-13 16:01:04 +0300
committerLars Wirzenius <liw@liw.fi>2017-10-13 16:01:04 +0300
commit3a572cb5d896c2e4e972dca2f84e531e90bec4c8 (patch)
tree03cb4c2883746c5e31ebee11fd455adf78b1684a
parentd9e213d0a866956a3adab75faae375a59174b19e (diff)
downloadick2-3a572cb5d896c2e4e972dca2f84e531e90bec4c8.tar.gz
Add: start_ick script to start ick
Can't see why the command in ick2.service doesn't work, and I'm tired of debugging this.
-rw-r--r--ick2.service5
-rw-r--r--setup.py2
-rw-r--r--start_ick11
3 files changed, 14 insertions, 4 deletions
diff --git a/ick2.service b/ick2.service
index 423e26c..9e2f4c1 100644
--- a/ick2.service
+++ b/ick2.service
@@ -20,9 +20,8 @@ After=network.target
Type=simple
User=www-data
Group=www-data
-WorkingDirectory=/var/lib/ick2
-Environment=ICK_CONTROLLER_CONFIG=/etc/ick/controller.conf
-ExecStart=/usr/bin/gunicorn3 --daemon --bind 127.0.0.1:12765 --log-file /tmp/gunicorn3.log --log-level debug ick_controller:app
+WorkingDirectory=/var/lib/ick
+ExecStart=/usr/bin/start_ick
KillSignal=QUIT
[Install]
diff --git a/setup.py b/setup.py
index 151dfb6..ac5ec63 100644
--- a/setup.py
+++ b/setup.py
@@ -28,6 +28,6 @@ setup(
url='http://liw.fi/ick/',
py_modules=['ick_controller'],
packages=['ick2', 'ick2version'],
- scripts=['create-token'],
+ scripts=['create-token', 'start_ick'],
data_files=[],
)
diff --git a/start_ick b/start_ick
new file mode 100644
index 0000000..10a25f6
--- /dev/null
+++ b/start_ick
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -eux
+
+export ICK_CONTROLLER_CONFIG=/etc/ick/controller.conf
+gunicorn3 \
+ --daemon \
+ --bind 127.0.0.1:12765 \
+ --log-file /tmp/gunicorn3.log \
+ --log-level debug \
+ ick_controller:app