mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
notification-server in docker (#6993)
This commit is contained in:
@@ -96,11 +96,6 @@ function check_process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# start
|
# start
|
||||||
function start_notification_server() {
|
|
||||||
notification-server -c ${central_config_dir} -l ${TOPDIR}/logs/notification-server.log &
|
|
||||||
sleep 1
|
|
||||||
}
|
|
||||||
|
|
||||||
function start_seafevents() {
|
function start_seafevents() {
|
||||||
check_python_executable;
|
check_python_executable;
|
||||||
$PYTHON -m seafevents.main --config-file ${central_config_dir}/seafevents.conf --logfile ${TOPDIR}/logs/seafevents.log -P ${TOPDIR}/pids/seafevents.pid &
|
$PYTHON -m seafevents.main --config-file ${central_config_dir}/seafevents.conf --logfile ${TOPDIR}/logs/seafevents.log -P ${TOPDIR}/pids/seafevents.pid &
|
||||||
@@ -108,15 +103,6 @@ function start_seafevents() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# monitor
|
# monitor
|
||||||
function monitor_notification_server() {
|
|
||||||
process_name="notification-server"
|
|
||||||
check_num=$(check_process $process_name)
|
|
||||||
if [ $check_num -eq 0 ]; then
|
|
||||||
log "Start $process_name"
|
|
||||||
start_notification_server
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function monitor_seafevents() {
|
function monitor_seafevents() {
|
||||||
process_name="seafevents.main"
|
process_name="seafevents.main"
|
||||||
check_num=$(check_process $process_name)
|
check_num=$(check_process $process_name)
|
||||||
@@ -142,9 +128,5 @@ while [ 1 ]; do
|
|||||||
monitor_seafevents
|
monitor_seafevents
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ENABLE_NOTIFICATION_SERVER ] && [ $ENABLE_NOTIFICATION_SERVER = "true" ]; then
|
|
||||||
monitor_notification_server
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 30
|
sleep 30
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user