Update to 2021-12-01 19:13

This commit is contained in:
Daniel Berteaud
2021-12-01 19:13:34 +01:00
commit 4c4556c660
2153 changed files with 60999 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
[Unit]
Description=Etherpad ({{ etherpad_id }} Instance)
After=syslog.target network.target
[Service]
Type=simple
User={{ etherpad_user }}
Group={{ etherpad_user }}
WorkingDirectory={{ etherpad_root_dir }}/app
ExecStart=/usr/bin/node ./src/node/server.js
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
MemoryLimit=1024M
SyslogIdentifier=etherpad-{{ etherpad_id }}
Restart=always
Environment=NODE_ENV=production
StartLimitInterval=0
RestartSec=20
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,7 @@
#!/bin/bash -e
restorecon -R {{ etherpad_root_dir }}
chown -R {{ etherpad_user }}:{{ etherpad_user }} {{ etherpad_root_dir }}/app
find {{ etherpad_root_dir }}/app -type f -exec chmod 644 "{}" \;
find {{ etherpad_root_dir }}/app -type d -exec chmod 755 "{}" \;
chmod 600 {{ etherpad_root_dir }}/app/{settings.json,SESSIONKEY.txt,APIKEY.txt}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
rm -f {{ etherpad_root_dir }}/backup/*

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -eo pipefail
/usr/bin/mysqldump \
{% if etherpad_db_server not in ['localhost', '127.0.0.1'] %}
--user={{ etherpad_db_user }} \
--password={{ etherpad_db_pass | quote }} \
--host={{ etherpad_db_server }} \
{% endif %}
--quick --single-transaction \
--add-drop-table {{ etherpad_db_name }} | zstd -c > {{ etherpad_root_dir }}/backup/{{ etherpad_db_name }}.sql.zst

View File

@@ -0,0 +1,32 @@
{
"title" : "{{ etherpad_title }}",
"skinName" : "{{ etherpad_theme }}",
"port" : {{ etherpad_port }},
"showSettingsInAdminPage" : false,
"dbType" : "mysql",
"dbSettings" : {
"user" : "{{ etherpad_db_user }}",
"host" : "{{ etherpad_db_server }}",
"port" : {{ etherpad_db_port }},
"password" : "{{ etherpad_db_pass }}",
"database" : "{{ etherpad_db_name }}",
"charset" : "utf8mb4"
},
"defaultPadText" : "",
"socketTransportProtocols" : ["websocket", "xhr-polling", "jsonp-polling", "htmlfile"],
"allowUnknownFileEnds" : false,
"trustProxy" : true,
"users": {
"admin": {
"password" : "{{ etherpad_admin_pass }}",
"is_admin" : true
}
},
"ep_delete_after_delay": {
"delay" : 2592000,
"loop" : true,
"loopDelay" : 3600,
"deleteAtStart" : true,
"text" : ""
}
}