more robust: install PHP daemon after Apache;
authorwenzelm
Tue, 05 Nov 2019 21:43:51 +0100
changeset 71251 ba14aa0b5a5d
parent 71250 6bf53035baf0
child 71252 b64fc38327ae
more robust: install PHP daemon after Apache;
src/Pure/Tools/phabricator.scala
--- a/src/Pure/Tools/phabricator.scala	Tue Nov 05 21:27:55 2019 +0100
+++ b/src/Pure/Tools/phabricator.scala	Tue Nov 05 21:43:51 2019 +0100
@@ -222,31 +222,6 @@
     config.execute("storage upgrade --force")
 
 
-    /* PHP daemon */
-
-    progress.echo("PHP daemon setup...")
-
-    config.execute("config set phd.user " + Bash.string(daemon_user))
-
-    Linux.service_install(isabelle_phabricator_name(),
-"""[Unit]
-Description=PHP daemon for Isabelle/Phabricator """ + quote(name) + """
-After=syslog.target network.target apache2.service mysql.service
-
-[Service]
-Type=oneshot
-User=""" + daemon_user + """
-Group=""" + daemon_user + """
-Environment=PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
-ExecStart=""" + config.home.implode + """/bin/phd start
-ExecStop=""" + config.home.implode + """/bin/phd stop
-RemainAfterExit=yes
-
-[Install]
-WantedBy=multi-user.target
-""")
-
-
     /* SSH hosting */
 
     progress.echo("SSH hosting setup...")
@@ -314,6 +289,32 @@
 
     Linux.service_restart("apache2")
 
+
+    /* PHP daemon */
+
+    progress.echo("PHP daemon setup...")
+
+    config.execute("config set phd.user " + Bash.string(daemon_user))
+
+    Linux.service_install(isabelle_phabricator_name(),
+"""[Unit]
+Description=PHP daemon for Isabelle/Phabricator """ + quote(name) + """
+After=syslog.target network.target apache2.service mysql.service
+
+[Service]
+Type=oneshot
+User=""" + daemon_user + """
+Group=""" + daemon_user + """
+Environment=PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
+ExecStart=""" + config.home.implode + """/bin/phd start
+ExecStop=""" + config.home.implode + """/bin/phd stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+""")
+
+
     progress.echo("\nDONE\nWeb configuration via " + server_url)
   }