aboutsummaryrefslogtreecommitdiffstats
path: root/roles/photostructure/templates/etc/systemd/system/photostructure.service.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/photostructure/templates/etc/systemd/system/photostructure.service.j2')
-rw-r--r--roles/photostructure/templates/etc/systemd/system/photostructure.service.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/photostructure/templates/etc/systemd/system/photostructure.service.j2 b/roles/photostructure/templates/etc/systemd/system/photostructure.service.j2
new file mode 100644
index 0000000..67700c3
--- /dev/null
+++ b/roles/photostructure/templates/etc/systemd/system/photostructure.service.j2
@@ -0,0 +1,19 @@
+[Unit]
+Description=PhotoStructure for Servers
+Documentation=https://photostructure.com/servers/
+Requires=network.target nss-user-lookup.target autofs.service
+After=network.target nss-user-lookup.target autofs.service
+
+[Service]
+User={{ photostructure_user }}
+Group={{ photostructure_user }}
+EnvironmentFile=/etc/sysconfig/photostructure
+WorkingDirectory={{ photostructure_install_dir }}
+ExecStart=/usr/bin/node ./photostructure
+Type=simple
+Restart=on-failure
+TimeoutSec=2min
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target