clawtainer/scripts/image-build-runtime.sh

21 lines
706 B
Bash

#!/usr/bin/env bash
set -euo pipefail
install -o 1000 -g 1000 -m 0644 \
/tmp/clawtainer-assets/0claw.toml \
/home/kasm-user/0claw.toml
ln -sf /usr/local/bin/0claw /usr/local/bin/zero-claw
mkdir -p "$HOME/.openclaw/canvas" "$HOME/.openclaw/cron" "$HOME/.openclaw/workspace"
chown -R 1000:1000 "$HOME/.openclaw"
sed -i 's/vncserver/vncserver -SecurityTypes None -DisableBasicAuth 1/g' /dockerstartup/vnc_startup.sh
sed -i 's/kasm_password_file:.*$/kasm_password_file:/g' /usr/share/kasmvnc/kasmvnc_defaults.yaml
cat <<'EOF' >"$STARTUPDIR/custom_startup.sh"
#!/usr/bin/env bash
/usr/bin/desktop_ready && openclaw gateway --bind lan --allow-unconfigured &
EOF
chmod +x "$STARTUPDIR/custom_startup.sh"