File size: 521 Bytes
a3316f0 | 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 | #!/bin/sh
# 生成 config.json
cat > /opt/openlist/data/config.json <<EOF
{
"scheme": {
"address": "0.0.0.0",
"http_port": 7860
},
"database": {
"type": "${DB_TYPE:-sqlite3}",
"host": "${DB_HOST:-}",
"port": ${DB_PORT:-0},
"user": "${DB_USER:-}",
"password": "${DB_PASS:-}",
"name": "${DB_NAME:-}",
"ssl_mode": "${DB_SSL:-}",
"db_file": "data/data.db",
"table_prefix": "x_"
}
}
EOF
# 赋予权限
chmod -R 777 /opt/openlist/data
# 启动服务
exec ./openlist server |