forked from fair/matrix-puppeteer-line
Tweak systemd units
Changes include: * Remove target unit * Create and use config directory * Use directory directly under /opt as home * Rename suggested user/group * Restart on failure * (aside) Rename Node module name after Chrome unit
This commit is contained in:
parent
b7734aa9ba
commit
d5cd9fe8b9
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "matrix-puppeteer-line-puppeteer",
|
||||
"name": "matrix-puppeteer-line-chrome",
|
||||
"version": "0.1.0",
|
||||
"description": "Puppeteer module for matrix-puppeteer-line",
|
||||
"description": "Chrome/Puppeteer backend for matrix-puppeteer-line",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://src.miscworks.net/fair/matrix-puppeteer-line.git"
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
[Unit]
|
||||
Description=Matrix-puppeteer-line Chrome backend
|
||||
PartOf=matrix-puppeteer-line-chrome.target
|
||||
Description=Chrome/Puppeteer backend for matrix-puppeteer-line
|
||||
After=multi-user.target network.target
|
||||
|
||||
[Service]
|
||||
; User=matrix-line
|
||||
; Group=matrix
|
||||
; User=matrix-puppeteer-line
|
||||
; Group=matrix-puppeteer-line
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
WorkingDirectory=/opt/synapse/bridges/matrix-puppeteer-line/puppet
|
||||
ExecStart=/bin/xvfb-run /usr/bin/node src/main.js
|
||||
RuntimeDirectory=matrix/puppeteer-line
|
||||
WorkingDirectory=/opt/matrix-puppeteer-line/puppet
|
||||
ConfigurationDirectory=matrix-puppeteer-line
|
||||
RuntimeDirectory=matrix-puppeteer-line
|
||||
ExecStart=/usr/bin/xvfb-run -a yarn start --config ${CONFIGURATION_DIRECTORY}/puppet-config.json
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[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
|
|
@ -1,14 +1,18 @@
|
|||
[Unit]
|
||||
Description=Matrix-puppeteer-line bridge
|
||||
BindsTo=matrix-puppeteer-line-chrome.target
|
||||
After=matrix-puppeteer-line-chrome.target
|
||||
Description=matrix-puppeteer-line bridge
|
||||
BindsTo=matrix-puppeteer-line-chrome.service
|
||||
PartOf=matrix-puppeteer-line-chrome.service
|
||||
After=matrix-puppeteer-line-chrome.service
|
||||
|
||||
[Service]
|
||||
; User=matrix-line
|
||||
; Group=matrix
|
||||
WorkingDirectory=/opt/synapse/bridges/matrix-puppeteer-line
|
||||
ExecStart=/opt/synapse/bridges/matrix-puppeteer-line/.venv/bin/python -m matrix_puppeteer_line
|
||||
RuntimeDirectory=matrix/puppeteer-line
|
||||
; User=matrix-puppeteer-line
|
||||
; Group=matrix-puppeteer-line
|
||||
WorkingDirectory=/opt/matrix-puppeteer-line
|
||||
ConfigurationDirectory=matrix-puppeteer-line
|
||||
RuntimeDirectory=matrix-puppeteer-line
|
||||
ExecStart=/opt/matrix-puppeteer-line/.venv/bin/python -m matrix_puppeteer_line -c ${CONFIGURATION_DIRECTORY}/config.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue