Set group ownership of systemd service config dir
Also mention that linking to config files is possible
This commit is contained in:
parent
1a7a11eaf3
commit
780dbed7c2
3
SETUP.md
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. 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. 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
|
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:
|
* 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. 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. 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}`
|
1. Start the services now and on every boot boot with `[sudo] systemd [--user] enable --now matrix-appservice-kakaotalk{,-node}`
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
|
@ -9,6 +9,7 @@ Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk/node
|
WorkingDirectory=/opt/matrix-appservice-kakaotalk/node
|
||||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||||
|
ConfigurationDirectoryMode=775
|
||||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||||
RuntimeDirectoryPreserve=yes
|
RuntimeDirectoryPreserve=yes
|
||||||
ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json
|
ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json
|
||||||
|
|
|
@ -7,6 +7,7 @@ After=multi-user.target network.target
|
||||||
; Group=matrix-appservice-kakaotalk
|
; Group=matrix-appservice-kakaotalk
|
||||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk
|
WorkingDirectory=/opt/matrix-appservice-kakaotalk
|
||||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||||
|
ConfigurationDirectoryMode=775
|
||||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||||
RuntimeDirectoryPreserve=yes
|
RuntimeDirectoryPreserve=yes
|
||||||
ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml
|
ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml
|
||||||
|
|
Loading…
Reference in New Issue