From 846285e5b75a8857fa20b481ccd26f6ea8a6e461 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 19 May 2021 10:08:16 +0900 Subject: [PATCH] Initial Systemd services --- systemd/matrix-puppeteer-line-chrome.service | 11 +++++++++++ systemd/matrix-puppeteer-line-chrome.target | 6 ++++++ systemd/matrix-puppeteer-line.service | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 systemd/matrix-puppeteer-line-chrome.service create mode 100644 systemd/matrix-puppeteer-line-chrome.target create mode 100644 systemd/matrix-puppeteer-line.service diff --git a/systemd/matrix-puppeteer-line-chrome.service b/systemd/matrix-puppeteer-line-chrome.service new file mode 100644 index 0000000..e08b436 --- /dev/null +++ b/systemd/matrix-puppeteer-line-chrome.service @@ -0,0 +1,11 @@ +[Unit] +Description=Matrix-puppeteer-line Chrome backend +PartOf=matrix-puppeteer-line-chrome.target + +[Service] +; User=matrix +WorkingDirectory=/opt/synapse/bridges/matrix-puppeteer-line/puppet +ExecStart=/bin/xvfb-run /usr/bin/node src/main.js + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/systemd/matrix-puppeteer-line-chrome.target b/systemd/matrix-puppeteer-line-chrome.target new file mode 100644 index 0000000..e5e32cc --- /dev/null +++ b/systemd/matrix-puppeteer-line-chrome.target @@ -0,0 +1,6 @@ +[Unit] +Description=Matrix puppeteer line bridge target +Requires=multi-user.target network.target +After=multi-user.target network.target +BindsTo=matrix-puppeteer-line-chrome.service +PartOf=matrix-puppeteer-line.service \ No newline at end of file diff --git a/systemd/matrix-puppeteer-line.service b/systemd/matrix-puppeteer-line.service new file mode 100644 index 0000000..d06f5ec --- /dev/null +++ b/systemd/matrix-puppeteer-line.service @@ -0,0 +1,12 @@ +[Unit] +Description=Matrix-puppeteer-line bridge +Requires=matrix-puppeteer-line-chrome.target +After=matrix-puppeteer-line-chrome.target + +[Service] +; User=matrix +WorkingDirectory=/opt/synapse/bridges/matrix-puppeteer-line +ExecStart=/opt/synapse/bridges/matrix-puppeteer-line/.venv/bin/python -m matrix_puppeteer_line + +[Install] +WantedBy=multi-user.target \ No newline at end of file