diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-13 16:35:47 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-13 16:35:47 +0100 |
| commit | 9f2ebc2cce3af0e685677c23f2098c115e034adf (patch) | |
| tree | bc6609cf851ee3f0a4f572d762b4ea35a34610f6 /roles/gemini/templates | |
| parent | f31e65c51681823ade14abad87c742101a1b823d (diff) | |
move ansible/ dir to root
Diffstat (limited to 'roles/gemini/templates')
| -rw-r--r-- | roles/gemini/templates/openrc/gemini | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/gemini/templates/openrc/gemini b/roles/gemini/templates/openrc/gemini new file mode 100644 index 0000000..fbc2cc8 --- /dev/null +++ b/roles/gemini/templates/openrc/gemini @@ -0,0 +1,30 @@ +#!/sbin/openrc-run + +description="agate gemini server (serving {{ src_dir }}/joeac.net/gemini/content)" + +start() +{ + ebegin "Starting agate (serving {{ src_dir }}/joeac.net/gemini/content)" + start-stop-daemon --start \ + --exec /root/.cargo/bin/agate \ + --background \ + --stdout /var/log/agate.log \ + --stderr /var/log/agate.log \ + --make-pidfile \ + --pidfile /run/agate.pid \ + -- \ + --content {{ src_dir }}/joeac.net/gemini/content/ \ + --addr 0.0.0.0:1965 \ + --addr [::]:1965 \ + --lang en-GB + eend $? +} + +stop() +{ + ebegin "Stopping agate" + start-stop-daemon --stop \ + --exec /usr/bin/pnpx \ + --pidfile /run/agate.pid + eend $? +} |
