summarylogtreecommitdiffstats
path: root/picoclaw-git.install
blob: a157e194b38eca3af5a305f171949890e230719b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
post_install() {
    cat <<'EOF'
==> PicoClaw (Git) installed successfully.

Web UI:
  - Start service: systemctl --user enable --now picoclaw
  - Access Web UI: http://127.0.0.1:18800

Configuration notice:
  - Your config may need updates for newer versions.
  - Default config path: ~/.picoclaw/config.json
  - Default Workspace path: ~/.picoclaw/workspace
  - Newer config template: /usr/share/picoclaw-git/examples/config.example.json
EOF
}

post_upgrade() {
    post_install

    cat <<'EOF'

Upgrade notice:
  - If picoclaw is running, please restart it manually:
    systemctl --user daemon-reload
    systemctl --user restart picoclaw
EOF
}

pre_remove() {
  if [ -n "${SUDO_USER:-}" ] && [ "${SUDO_USER}" != "root" ] && command -v runuser >/dev/null 2>&1; then
    runuser -u "$SUDO_USER" -- systemctl --user disable --now picoclaw >/dev/null 2>&1 || true
  fi
}