rekysda commited on
Commit
f51cddd
·
verified ·
1 Parent(s): 285974f

Update start-openclaw.sh

Browse files
Files changed (1) hide show
  1. start-openclaw.sh +27 -0
start-openclaw.sh CHANGED
@@ -3,6 +3,33 @@ set -e
3
 
4
  echo "🚀 Starting OpenClaw Deployment..."
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  mkdir -p /root/.openclaw/agents/main/sessions
7
  mkdir -p /root/.openclaw/credentials
8
  mkdir -p /root/.openclaw/sessions
 
3
 
4
  echo "🚀 Starting OpenClaw Deployment..."
5
 
6
+ # Cek apakah file konfigurasi sudah ada di lokasi yang benar
7
+ if [ ! -f /root/.openclaw/openclaw.json ]; then
8
+ echo "openclaw.json not found, creating..."
9
+ # Buat direktori jika belum ada
10
+ mkdir -p /root/.openclaw
11
+
12
+ # Tulis konfigurasi menggunakan 'cat' atau 'echo'
13
+ cat > /root/.openclaw/openclaw.json <<EOF
14
+ {
15
+ "agents": {
16
+ "defaults": {
17
+ "workspace": "/root/.openclaw/workspace"
18
+ }
19
+ },
20
+ "channels": {
21
+ "whatsapp": {
22
+ "dmPolicy": "allowlist",
23
+ "allowFrom": ["+6281335054383"] // Ganti dengan nomor WhatsApp Anda
24
+ }
25
+ }
26
+ }
27
+ EOF
28
+ echo "openclaw.json created at /root/.openclaw/"
29
+ else
30
+ echo "openclaw.json already exists at /root/.openclaw/"
31
+ fi
32
+
33
  mkdir -p /root/.openclaw/agents/main/sessions
34
  mkdir -p /root/.openclaw/credentials
35
  mkdir -p /root/.openclaw/sessions