| 1 | #!/bin/bash |
| 2 | set -e |
| 3 | export http_proxy=http://10.0.2.100:3128 https_proxy=http://10.0.2.100:3128 |
| 4 | export no_proxy=localhost,127.0.0.1,10.0.2.101 |
| 5 | systemctl disable --now systemd-resolved |
| 6 | rm -f /etc/resolv.conf |
| 7 | install -m 644 /opt/openclaw/resolv.conf /etc/resolv.conf |
| 8 | if ! command -v docker >/dev/null; then |
| 9 | apt-get -o Acquire::Retries=10 update |
| 10 | DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io |
| 11 | fi |
| 12 | systemctl daemon-reload |
| 13 | systemctl restart docker |
| 14 | mkdir -p /opt/openclaw/state/workspace |
| 15 | if ! test -f /opt/openclaw/state/openclaw.json; then |
| 16 | cp /opt/openclaw/openclaw.json /opt/openclaw/state/openclaw.json |
| 17 | fi |
| 18 | chown -R 1000:1000 /opt/openclaw/state |
| 19 | chmod 700 /opt/openclaw/state |
| 20 | docker build --build-arg http_proxy --build-arg https_proxy -t openclaw-trial - < /opt/openclaw/Dockerfile |
| 21 | systemctl enable openclaw |
| 22 | systemctl restart openclaw |