zeroclaw, add runit script for web daemon.

This commit is contained in:
me
2026-10-07 00:05:39 -07:00
parent 562c2e4416
commit 393ff77eaf
+44 -11
View File
@@ -112,6 +112,41 @@
state: started
enabled: true
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Script
ansible.builtin.copy:
content: |
#!/bin/sh -e
# Allow using the ZeroClaw frontend.
exec 2>&1
exec chpst -u {{ user }} zeroclaw daemon
dest: "{{ zeroclaw_runit_start }}"
mode: "0755"
when: ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Log | Script
ansible.builtin.copy:
content: |
#!/bin/sh -e
exec svlogd -tt {{ zeroclaw_runit_log_dest }}
dest: "{{ zeroclaw_runit_start }}"
mode: "0755"
when: ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Log | Config
ansible.builtin.copy:
content: |
s1000000 # rotate at 1 MB
n5 # keep 5 old files
dest: "{{ zeroclaw_runit_log_config }}"
mode: "0755"
when: ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Enable
ansible.builtin.service:
name: "{{ zeroclaw }}"
state: started
enabled: true
- name: Workstation | Linux | Software | ZeroClaw | ollama | Wait
ansible.builtin.uri:
url: http://127.0.0.1:11434/api/version
@@ -162,17 +197,15 @@
become: true
become_user: "{{ user }}"
#- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Config
# ansible.builtin.copy:
# src: files/settings/zeroclaw.config.toml
# dest: "{{ user_user.home }}/.zeroclaw/config.toml"
# owner: "{{ user }}"
# mode: "0644"
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Test
ansible.builtin.debug:
msg: TBD
### zeroclaw agent -m "Hello!" # quick test
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Wait
ansible.builtin.uri:
url: http://127.0.0.1:42617/api/version
status_code: 200
timeout: 5
register: health
until: health.status == 200
retries: 12
delay: 5
### Nah, run on command instead of as daemon, otherwise will eat power.
###- name: Workstation | Linux | Software | ZeroClaw | Init Scripts | zeroclaw