mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
start and stop seahub through seahub.sh and gunicorn
This commit is contained in:
parent
b7ef93b362
commit
cd4a8cc9db
|
@ -7,8 +7,7 @@ function init_seahub {
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_seahub {
|
function start_seahub {
|
||||||
echo "Starting seahub..."
|
/opt/seafile/seafile-server-latest/seahub.sh start
|
||||||
python3 /opt/seafile/seafile-server-latest/seahub/manage.py runserver 0.0.0.0:8000
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_socat {
|
function start_socat {
|
||||||
|
@ -26,8 +25,7 @@ function watch_server {
|
||||||
while true; do
|
while true; do
|
||||||
sleep 2
|
sleep 2
|
||||||
if ! nc -z seafile-server 8082 2>/dev/null; then
|
if ! nc -z seafile-server 8082 2>/dev/null; then
|
||||||
echo "Seafile server is unreachable. Stopping seahub..."
|
/opt/seafile/seafile-server-latest/seahub.sh stop
|
||||||
pkill -f manage.py
|
|
||||||
while ! nc -z seafile-server 8082 2>/dev/null; do
|
while ! nc -z seafile-server 8082 2>/dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue