server/linx: Added helper script for uploading files to the service

dehydrated
Felix Stupp 5 years ago
parent 574e9949b7
commit e0342a6bba
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -73,6 +73,14 @@
notify:
- restart linx
- name: Install helper script for uploading
template:
src: "upload.sh"
dest: "{{ user_directory }}/upload.sh"
owner: root
group: "{{ system_user }}"
mode: "u=rwx,g=rx,o="
- name: Register service for linx
template:
src: "linx.service"

@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail;
if [[ -z "${1:-}" ]]; then
echo "Missing file for upload" > /dev/stderr;
exit 2;
fi
curl -H "Linx-Api-Key: {{ auth_code }}" -H "Linx-Delete-Key: {{ auth_code }}" -T "$1" https://{{ domain }}/upload/;
Loading…
Cancel
Save