diff --git a/SETUP.md b/SETUP.md index a4f5c13..4c87a77 100644 --- a/SETUP.md +++ b/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 diff --git a/systemd/matrix-appservice-kakaotalk-node.service b/systemd/matrix-appservice-kakaotalk-node.service index a96c7af..617c5dd 100644 --- a/systemd/matrix-appservice-kakaotalk-node.service +++ b/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 diff --git a/systemd/matrix-appservice-kakaotalk.service b/systemd/matrix-appservice-kakaotalk.service index 428b88b..36b12c0 100644 --- a/systemd/matrix-appservice-kakaotalk.service +++ b/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