summaryrefslogtreecommitdiffstats
path: root/roles/upload/templates/upload.service
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-19 09:22:10 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-19 09:22:10 -0400
commitec95e5829cdf179be145b229eb3e92178d0e92b8 (patch)
treedf75e0fb6fd84417d4503550f1dd3f17ee26533e /roles/upload/templates/upload.service
parent7671b51616a25fa6cff9c26fe65d5f703ff94e21 (diff)
downloademacsconf-ansible-ec95e5829cdf179be145b229eb3e92178d0e92b8.tar.xz
emacsconf-ansible-ec95e5829cdf179be145b229eb3e92178d0e92b8.zip
Add upload
Diffstat (limited to '')
-rw-r--r--roles/upload/templates/upload.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/upload/templates/upload.service b/roles/upload/templates/upload.service
new file mode 100644
index 0000000..2d65a74
--- /dev/null
+++ b/roles/upload/templates/upload.service
@@ -0,0 +1,16 @@
+# {{ ansible_managed }}
+
+[Unit]
+Description=PsiTransfer
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User={{ upload_user }}
+WorkingDirectory=/home/{{ upload_user }}/psitransfer
+ExecStart=/usr/bin/node app.js
+Environment=NODE_ENV=production PSITRANSFER_ADMIN_PASS="{{ upload_admin_password }}" PSITRANSFER_UPLOAD_PASS="{{ upload_password }}" PSITRANSFER_UPLOAD_DIR="{{ upload_dir }}"
+Restart=always
+
+[Install]
+WantedBy=multi-user.target