Skip to content
Permalink
Browse files

[scripts] improve seafile.sh & seahub.sh to allow multiple seafile se…

…rver instances running on the same machine
  • Loading branch information...
lins05 committed Sep 2, 2013
1 parent f61ccb5 commit 3b1e08a125867cc854b529b4dd612dbb2a00dcaa
Showing with 7 additions and 7 deletions.
  1. +6 −6 scripts/seafile.sh
  2. +1 −1 scripts/seahub.sh
@@ -87,9 +87,9 @@ function validate_already_running () {
exit 1;
fi

check_component_running "ccnet-server" "ccnet-server -c"
check_component_running "seaf-server" "seaf-server -c"
check_component_running "httpserver" "httpserver -c"
check_component_running "ccnet-server" "ccnet-server -c ${default_ccnet_conf_dir}"
check_component_running "seaf-server" "seaf-server -c ${default_ccnet_conf_dir}"
check_component_running "httpserver" "httpserver -c ${default_ccnet_conf_dir}"
}

function start_seafile_server () {
@@ -122,9 +122,9 @@ function stop_seafile_server () {

echo "Stopping seafile server ..."
pkill -SIGTERM -f "seafile-controller -c ${default_ccnet_conf_dir}"
pkill ccnet-server
pkill seaf-server
pkill httpserver
pkill -f "ccnet-server -c ${default_ccnet_conf_dir}"
pkill -f "seaf-server -c ${default_ccnet_conf_dir}"
pkill -f "httpserver -c ${default_ccnet_conf_dir}"
return 0
}

@@ -123,7 +123,7 @@ else
fi

function warning_if_seafile_not_running () {
if ! pgrep -f "seafile-controller -c" 2>/dev/null 1>&2; then
if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
echo
echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
echo

0 comments on commit 3b1e08a

Please sign in to comment.
You can’t perform that action at this time.