summaryrefslogtreecommitdiff
path: root/roles/etherpad/templates/openrc
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-08-13 16:35:47 +0100
committerJoe Carstairs <me@joeac.net>2026-08-13 16:35:47 +0100
commit9f2ebc2cce3af0e685677c23f2098c115e034adf (patch)
treebc6609cf851ee3f0a4f572d762b4ea35a34610f6 /roles/etherpad/templates/openrc
parentf31e65c51681823ade14abad87c742101a1b823d (diff)
move ansible/ dir to root
Diffstat (limited to 'roles/etherpad/templates/openrc')
-rw-r--r--roles/etherpad/templates/openrc/etherpad28
1 files changed, 28 insertions, 0 deletions
diff --git a/roles/etherpad/templates/openrc/etherpad b/roles/etherpad/templates/openrc/etherpad
new file mode 100644
index 0000000..f5f7260
--- /dev/null
+++ b/roles/etherpad/templates/openrc/etherpad
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+
+description="Run etherpad document server"
+
+start()
+{
+ ebegin "Starting etherpad"
+ start-stop-daemon --start \
+ --env NODE_ENV={{ etherpad_node_env }} \
+ --exec /usr/bin/pnpx \
+ --background \
+ --chdir {{ src_dir }}/etherpad \
+ --stdout /var/log/etherpad.log \
+ --stderr /var/log/etherpad.log \
+ --make-pidfile \
+ --pidfile /run/etherpad.pid \
+ -- tsx src/node/server.ts
+ eend $?
+}
+
+stop()
+{
+ ebegin "Stopping etherpad"
+ start-stop-daemon --stop \
+ --exec /usr/bin/pnpx \
+ --pidfile /run/etherpad.pid
+ eend $?
+}