From e97b9cf50d4653f35666225b9da36fd31c28916c Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Thu, 24 Feb 2022 21:58:20 -0600 Subject: [PATCH] sftpgo: add service --- srcpkgs/sftpgo/files/sftpgo/run | 11 +++++++++++ srcpkgs/sftpgo/template | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 srcpkgs/sftpgo/files/sftpgo/run diff --git a/srcpkgs/sftpgo/files/sftpgo/run b/srcpkgs/sftpgo/files/sftpgo/run new file mode 100755 index 00000000000..f35ca0281a5 --- /dev/null +++ b/srcpkgs/sftpgo/files/sftpgo/run @@ -0,0 +1,11 @@ +#!/bin/sh + +export SFTPGO_HTTPD__TEMPLATES_PATH=/usr/share/sftpgo/templates +export SFTPGO_HTTPD__STATIC_FILES_PATH=/usr/share/sftpgo/static +export SFTPGO_DATA_PROVIDER__DRIVER=sqlite +export SFTPGO_DATA_PROVIDER__NAME=/var/lib/sftpgo/sftpgo.db +export SFTPGO_SFTPD__HOST_KEYS=/var/lib/sftpgo/id_rsa,/var/lib/sftpgo/id_ecdsa,/var/lib/sftpgo/id_ed25519 + +[ -r ./conf ] && . ./conf + +exec sftpgo serve diff --git a/srcpkgs/sftpgo/template b/srcpkgs/sftpgo/template index 4cc704f26d3..4d58d0f4a6a 100644 --- a/srcpkgs/sftpgo/template +++ b/srcpkgs/sftpgo/template @@ -1,7 +1,7 @@ # Template file for 'sftpgo' pkgname=sftpgo version=2.2.2 -revision=1 +revision=2 build_style=go go_import_path=github.com/drakkan/sftpgo/v2 short_desc="Fully featured and highly configurable SFTP server" @@ -10,7 +10,12 @@ license="AGPL-3.0-only" homepage="https://github.com/drakkan/sftpgo" distfiles="https://github.com/drakkan/sftpgo/archive/refs/tags/v$version.tar.gz" checksum=d5c68223017071efce597712612ce7ce4334a70f773a8c0b7afa7a69427c79c8 +make_dirs="/var/lib/sftpgo root root 0750" post_install() { + vmkdir usr/share/sftpgo + vcopy static usr/share/sftpgo/ + vcopy templates usr/share/sftpgo/ vlicense LICENSE + vsv sftpgo }