2021-08-13 18:53:18 +08:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2022-01-23 06:28:26 +08:00
|
|
|
# avoid missing directories for fresh install
|
|
|
|
mkdir -p /usr/share/etherpad-lite/.config
|
|
|
|
mkdir -p /usr/share/etherpad-lite/node_modules
|
|
|
|
|
2022-01-17 00:58:55 +08:00
|
|
|
chown etherpad:etherpad /usr/share/etherpad-lite/APIKEY.txt
|
|
|
|
# minified assets
|
|
|
|
chown -R etherpad:etherpad /usr/share/etherpad-lite/var
|
|
|
|
# npm update wants to write this
|
|
|
|
chown -R etherpad:etherpad /usr/share/etherpad-lite/.config
|
|
|
|
# etherpad wants to write to this
|
|
|
|
chown -R etherpad:etherpad /usr/share/etherpad-lite/node_modules
|
2021-08-13 18:53:18 +08:00
|
|
|
chown root:root /usr/lib/systemd/system/etherpad.service
|
|
|
|
|
|
|
|
if [ ! -f /.dockerenv ]; then
|
|
|
|
systemctl enable etherpad.service
|
|
|
|
systemctl daemon-reload
|
2021-10-16 03:07:13 +08:00
|
|
|
startService etherpad.service || echo "etherpad service could not be registered or started"
|
2021-08-13 18:53:18 +08:00
|
|
|
fi
|