* restart by doing 'sendcommand down 1' which will make citserver restart internaly.
[citadel.git] / citadel / setup.c
index 48df424963243ba4bbddb4103136c3012e7fbcca..e1623db6c0e89567d5f22e1646a06e9c978d7d5f 100644 (file)
@@ -446,9 +446,12 @@ void install_init_scripts(void)
                                setup_directory
                        );
        fprintf(fp,     "               ;;\n"
-                       "restart)       $0 stop\n"
-                       "               $0 start\n"
-                       "               ;;\n"
+                       "restart)       if $CITADEL_DIR/sendcommand DOWN 1 >/dev/null 2>&1 ; then\n"
+                       "                       echo \"ok\"\n"
+                       "               else\n"
+                       "                       echo \"failed\"\n"
+                       "               fi\n"
+                       "               ;;\n"
                        "*)             echo \"Usage: $0 {start|stop|restart}\"\n"
                        "               exit 1\n"
                        "               ;;\n"