From c6c4745280592c4eca46ff59de7911a8b31891ac Mon Sep 17 00:00:00 2001 From: Andreas Moik Date: Wed, 24 Aug 2016 13:47:55 +0200 Subject: [PATCH] added services for systemd and upstart --- system/services/systemd/phantomjs@.service | 13 +++++++++++++ system/services/systemd/unoconv@.service | 13 +++++++++++++ system/services/upstart/unoconv.conf | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100755 system/services/systemd/phantomjs@.service create mode 100644 system/services/systemd/unoconv@.service create mode 100755 system/services/upstart/unoconv.conf diff --git a/system/services/systemd/phantomjs@.service b/system/services/systemd/phantomjs@.service new file mode 100755 index 000000000..bd4a79524 --- /dev/null +++ b/system/services/systemd/phantomjs@.service @@ -0,0 +1,13 @@ +[Unit] +Description=PhantomJS headless browser with HighCharts +After=network.target + +[Service] +ExecStart=/usr/bin/phantomjs /home/%i/highcharts/highcharts-convert.js -host 10.127.0.197 -port 3003 +KillMode=process +Restart=on-failure on-abort +User=%i +Group=%i + +[Install] +WantedBy=multi-user.target diff --git a/system/services/systemd/unoconv@.service b/system/services/systemd/unoconv@.service new file mode 100644 index 000000000..ed2827649 --- /dev/null +++ b/system/services/systemd/unoconv@.service @@ -0,0 +1,13 @@ +[Unit] +Description=The unoconv listener running on User %I +After=network.target + +[Service] +ExecStart=/usr/bin/unoconv -l +KillMode=process +Restart=on-failure on-abort +User=%i +Group=%i + +[Install] +WantedBy=multi-user.target diff --git a/system/services/upstart/unoconv.conf b/system/services/upstart/unoconv.conf new file mode 100755 index 000000000..d5aa3cd57 --- /dev/null +++ b/system/services/upstart/unoconv.conf @@ -0,0 +1,9 @@ +description "unoconv listener" + +start on runlevel [2345] +stop on runlevel [016] +respawn +expect daemon +setuid unoconv +exec unoconv -l & +