mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
start.sh: refactored, add first admin init
This commit is contained in:
parent
c25e4572c3
commit
c2bedff29d
|
@ -1,9 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
/scripts/create_data_links.sh
|
||||
function start_seahub {
|
||||
/scripts/create_data_links.sh
|
||||
echo "{ \"email\": \"${SEAFILE_ADMIN_EMAIL}\",\"password\": \"${SEAFILE_ADMIN_PASSWORD}\"}" | tee /opt/seafile/conf/admin.txt
|
||||
#/opt/seafile/seafile-server-latest/seahub.sh start
|
||||
python3 /opt/seafile/seafile-server-latest/check_init_admin.py
|
||||
python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000
|
||||
}
|
||||
|
||||
mkdir -p /opt/seafile/seafile-server-latest/runtime
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2 &
|
||||
function start_socat {
|
||||
mkdir -p /opt/seafile/seafile-server-latest/runtime
|
||||
socat -d -d UNIX-LISTEN:/opt/seafile/seafile-server-latest/runtime/seafile.sock,fork TCP:seafile-server:8001,forever,keepalive,keepidle=10,keepintvl=10,keepcnt=2
|
||||
}
|
||||
|
||||
python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000
|
||||
function keep_running {
|
||||
while true; do
|
||||
tail -f /dev/null & wait ${!}
|
||||
done
|
||||
}
|
||||
|
||||
start_socat &
|
||||
start_seahub &
|
||||
keep_running
|
Loading…
Reference in a new issue