Set group ownership of systemd service config dir

Also mention that linking to config files is possible
This commit is contained in:
Andrew Ferrazzutti 2022-04-28 22:26:33 -04:00
parent 1a7a11eaf3
commit 780dbed7c2
3 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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