src/Pure/Tools/phabricator.scala
changeset 71111 cd166c3904dd
parent 71109 8c1c717a830b
child 71112 eed5b6188371
--- a/src/Pure/Tools/phabricator.scala	Wed Nov 13 17:34:35 2019 +0100
+++ b/src/Pure/Tools/phabricator.scala	Wed Nov 13 18:30:43 2019 +0100
@@ -569,14 +569,16 @@
     val ssh_name = isabelle_phabricator_name(name = "ssh")
     val ssh_command = Path.explode("/usr/local/bin") + Path.basic(ssh_name)
 
+    Linux.service_shutdown(ssh_name)
+
     val old_system_port = read_ssh_port(sshd_conf_system)
     if (old_system_port != system_port) {
       progress.echo("Reconfigurig system ssh service")
-      Linux.service_stop("ssh")
+      Linux.service_shutdown("ssh")
       write_ssh_port(sshd_conf_system, system_port)
+      Linux.service_start("ssh")
     }
 
-
     progress.echo("Configuring " + ssh_name + " service")
 
     File.write(ssh_command,
@@ -651,11 +653,6 @@
           Bash.string(config.name) + """@localhost conduit conduit.ping""").print
       }
     }
-
-    if (old_system_port != system_port) {
-      progress.echo("Restarting system ssh service")
-      Linux.service_start("ssh")
-    }
   }