Changeset: fff62b74bd61 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fff62b74bd61
Modified Files:
        debian/monetdb5-sql.init.d
        tools/merovingian/daemon/argvcmds.c
Branch: default
Log Message:

Merge with Dec2016 branch.


diffs (125 lines):

diff --git a/debian/monetdb5-sql.init.d b/debian/monetdb5-sql.init.d
--- a/debian/monetdb5-sql.init.d
+++ b/debian/monetdb5-sql.init.d
@@ -37,16 +37,16 @@ set -e
 init() {
     if [ ! -d ${DBFARM} ]; then
         mkdir ${DBFARM}
-               echo "${DBFARM} doesn't exist, creating..."
+       echo "${DBFARM} doesn't exist, creating..."
     fi
 
-       chown -R monetdb.monetdb ${DBFARM}
-       chmod 770 ${DBFARM}
+    chown -R monetdb.monetdb ${DBFARM}
+    chmod 770 ${DBFARM}
 
-       if [ ! -f ${DBFARM}/.merovingian_properties ]; then
-               echo "${DBFARM} not initialized, initializing..."
-               sudo -u monetdb ${DAEMON} create ${DBFARM} || exit 1
-       fi
+    if [ ! -f ${DBFARM}/.merovingian_properties ]; then
+       echo "${DBFARM} not initialized, initializing..."
+       sudo -u monetdb ${DAEMON} create ${DBFARM} || exit 1
+    fi
 }
 
 running_pid() {
@@ -70,42 +70,41 @@ running() {
 }
 
 case "$1" in
-  start)
-        if [ "$STARTUP" != "yes" ]; then
-            echo "can't start, should be enabled first by changing STARTUP to 
yes in /etc/default/monetdb5-sql"
-            exit 0
-        fi
+start)
+    if [ "$STARTUP" != "yes" ]; then
+        echo "can't start, should be enabled first by changing STARTUP to yes 
in /etc/default/monetdb5-sql"
+        exit 0
+    fi
 
-        if running; then
-            echo "$NAME is already running"
-            exit 0
-        fi
+    if running; then
+        echo "$NAME is already running"
+        exit 0
+    fi
 
-        init
+    init
 
-        echo -n "Starting $DESC: "
-        start-stop-daemon --start --exec $DAEMON -c monetdb:monetdb -- start 
$DAEMON_OPTS $DBFARM
-        if running ; then
-            echo "$NAME."
-        else
-            echo " ERROR, $NAME didn't start"
-        fi
-        ;;
-  stop)
-        if running ;  then
-            echo -n "Stopping $DESC: "
-            start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON -c 
monetdb:monetdb -- stop ${DBFARM}
-            echo "$NAME."
-               else
-                       echo "$NAME not running."
-        fi
-        ;;
-  restart)
-        $0 stop
-        sleep 5
-        $0 start
-        ;;
-  status)
+    echo -n "Starting $DESC: "
+    start-stop-daemon --start --exec $DAEMON -c monetdb:monetdb -- start 
$DAEMON_OPTS $DBFARM
+    if running ; then
+        echo "$NAME."
+    else
+        echo " ERROR, $NAME didn't start"
+    fi
+    ;;
+stop)
+    if running ;  then
+        echo -n "Stopping $DESC: "
+        start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON --retry 60 
--signal TERM
+        echo "$NAME."
+    else
+       echo "$NAME not running."
+    fi
+    ;;
+restart)
+    $0 stop
+    $0 start
+    ;;
+status)
     echo -n "$NAME is "
     if running ;  then
         echo "running"
@@ -114,7 +113,7 @@ case "$1" in
         exit 1
     fi
     ;;
-  *)
+*)
     echo "Usage: $0 {start|stop|restart|status}" >&2
     exit 1
     ;;
diff --git a/tools/merovingian/daemon/argvcmds.c 
b/tools/merovingian/daemon/argvcmds.c
--- a/tools/merovingian/daemon/argvcmds.c
+++ b/tools/merovingian/daemon/argvcmds.c
@@ -501,8 +501,8 @@ command_stop(confkeyval *ckv, int argc, 
                return(1);
        }
 
-       /* wait up to 5 seconds for monetdbd to actually stop */
-       for (i = 0; i < 10; i++) {
+       /* wait up to 30 seconds for monetdbd to actually stop */
+       for (i = 0; i < 60; i++) {
                tv.tv_sec = 0;
                tv.tv_usec = 500000;
                select(0, NULL, NULL, NULL, &tv);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to