From ec95e5829cdf179be145b229eb3e92178d0e92b8 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 19 Oct 2022 09:22:10 -0400 Subject: Add upload --- roles/upload/templates/upload.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 roles/upload/templates/upload.service (limited to 'roles/upload/templates/upload.service') 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 -- cgit v1.2.3