diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-06 10:45:03 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-06 10:45:03 +0100 |
| commit | 832f232972c65e7ebed62000aefe825cf8d8ff38 (patch) | |
| tree | 5b378cffc7b985f2f2e9dd41ec188f9ddd994b60 /ansible/roles/etherpad/templates/openrc | |
| parent | 55100c1e0ffcd490b3e3257fe4e75296f4f32e62 (diff) | |
ansible-ise etherpad
Diffstat (limited to 'ansible/roles/etherpad/templates/openrc')
| -rw-r--r-- | ansible/roles/etherpad/templates/openrc/etherpad | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ansible/roles/etherpad/templates/openrc/etherpad b/ansible/roles/etherpad/templates/openrc/etherpad new file mode 100644 index 0000000..5c31e4b --- /dev/null +++ b/ansible/roles/etherpad/templates/openrc/etherpad @@ -0,0 +1,36 @@ +#!/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 {{ etherpad_src_dir }} \ + --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 $? +} + +restart() +{ + ebegin "Restarting etherpad" + svc_stop + svc_start + eend $? +} |
