a little nicer wrt pep8
[sfa.git] / systemd / sfa-db.service
index f2d7d2c..6381bbc 100644 (file)
@@ -1,17 +1,16 @@
 [Unit]
 Description=SFA Database service
-#After=network.target
+Requires=postgresql.service
+After=postgresql.service
 
 [Service]
 Type=oneshot
-ExecStart=/bin/bash -c "/usr/bin/sfa-db-init.sh"
+ExecStart=/bin/bash -c "/usr/bin/sfa-setup.sh start-db"
 RemainAfterExit=true
 # systemd insists that we define this one
 # that does not seem useful in our case
 ExecStop=/bin/true
 StandardOutput=journal
-Requires=postgresql
-After=postgresql
 
 [Install]
 WantedBy=multi-user.target