Browse Source

Set group ownership of systemd service config dir

Also mention that linking to config files is possible
master
Andrew Ferrazzutti 4 months ago
parent
commit
780dbed7c2
  1. 3
      SETUP.md
  2. 1
      systemd/matrix-appservice-kakaotalk-node.service
  3. 1
      systemd/matrix-appservice-kakaotalk.service

3
SETUP.md

@ -56,10 +56,11 @@ To use them as-is, follow these steps after [initial setup](#initial-setup):
1. Copy/link the service files to a directory in the system unit search path, such as `/etc/systemd/system/`
1. Create the services' configuration directory with `sudo mkdir /etc/matrix-appservice-kakaotalk`
1. RECOMMENDED: Create the `matrix-appservice-kakaotalk` user on your system with `adduser` or an equivalent command, then uncomment the `User` and `Group` lines in the service files
* If creating this user, also give it write permissions on the services' configuration directory with `chgrp matrix-appservice-kakaotalk /etc/matrix-appservice-kakaotalk && chmod g+w /etc/matrix-appservice-kakaotalk`
* To install as user units:
1. Copy/link the service files to a directory in the user unit search path, such as `~/.config/systemd/user`
1. Create the services' configuration directory with `mkdir $XDG_CONFIG_HOME/matrix-appservice-kakaotalk`
1. Copy the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
1. Copy/link the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
1. Start the services now and on every boot boot with `[sudo] systemd [--user] enable --now matrix-appservice-kakaotalk{,-node}`
## Upgrading

1
systemd/matrix-appservice-kakaotalk-node.service

@ -9,6 +9,7 @@ Type=notify
NotifyAccess=all
WorkingDirectory=/opt/matrix-appservice-kakaotalk/node
ConfigurationDirectory=matrix-appservice-kakaotalk
ConfigurationDirectoryMode=775
RuntimeDirectory=matrix-appservice-kakaotalk
RuntimeDirectoryPreserve=yes
ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json

1
systemd/matrix-appservice-kakaotalk.service

@ -7,6 +7,7 @@ After=multi-user.target network.target
; Group=matrix-appservice-kakaotalk
WorkingDirectory=/opt/matrix-appservice-kakaotalk
ConfigurationDirectory=matrix-appservice-kakaotalk
ConfigurationDirectoryMode=775
RuntimeDirectory=matrix-appservice-kakaotalk
RuntimeDirectoryPreserve=yes
ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml

Loading…
Cancel
Save