Spaces:
Paused
Paused
Igor commited on
Commit ·
7d7ac25
1
Parent(s): 91aae57
Fix start.sh syntax and revert /data changes
Browse files
start.sh
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
# Set a writable directory for x-ui
|
| 4 |
-
|
| 5 |
-
export XUI_DB_FOLDER=/data/x-ui # Point database to /data
|
| 6 |
|
| 7 |
# Function to run chisel client in a loop
|
| 8 |
run_chisel() {
|
|
@@ -11,7 +10,7 @@ run_chisel() {
|
|
| 11 |
/usr/local/bin/chisel client -v --auth "cloud:2025" vds1.iri1968.dpdns.org:80 R:8443:localhost:2053
|
| 12 |
echo "Chisel client exited. Restarting in 5 seconds..."
|
| 13 |
sleep 5
|
| 14 |
-
|
| 15 |
}
|
| 16 |
|
| 17 |
# Start chisel in the background
|
|
@@ -20,6 +19,6 @@ run_chisel &
|
|
| 20 |
# Set webBasePath
|
| 21 |
/usr/local/x-ui/x-ui setting -webBasePath /
|
| 22 |
|
| 23 |
-
# Start x-ui in the foreground
|
| 24 |
-
cd /
|
| 25 |
-
/
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Set a writable directory for the x-ui database
|
| 4 |
+
export XUI_DB_FOLDER=/tmp
|
|
|
|
| 5 |
|
| 6 |
# Function to run chisel client in a loop
|
| 7 |
run_chisel() {
|
|
|
|
| 10 |
/usr/local/bin/chisel client -v --auth "cloud:2025" vds1.iri1968.dpdns.org:80 R:8443:localhost:2053
|
| 11 |
echo "Chisel client exited. Restarting in 5 seconds..."
|
| 12 |
sleep 5
|
| 13 |
+
done # Fixed: added 'done' for the while loop
|
| 14 |
}
|
| 15 |
|
| 16 |
# Start chisel in the background
|
|
|
|
| 19 |
# Set webBasePath
|
| 20 |
/usr/local/x-ui/x-ui setting -webBasePath /
|
| 21 |
|
| 22 |
+
# Start x-ui in the foreground
|
| 23 |
+
cd /usr/local/x-ui # Reverted to /usr/local/x-ui
|
| 24 |
+
./x-ui
|