diff --git a/mkosi.default.d/arch/mkosi.default b/mkosi.default.d/arch/mkosi.default index 9f58f6d..ac48903 100644 --- a/mkosi.default.d/arch/mkosi.default +++ b/mkosi.default.d/arch/mkosi.default @@ -11,6 +11,7 @@ Packages = nginx-mod-headers-more certbot-nginx php-sqlite + go openssh iputils which diff --git a/mkosi.default.d/debian/mkosi.default b/mkosi.default.d/debian/mkosi.default index e000d28..877cfdf 100644 --- a/mkosi.default.d/debian/mkosi.default +++ b/mkosi.default.d/debian/mkosi.default @@ -13,5 +13,6 @@ Packages = python3-certbot-nginx knot-dnsutils php-sqlite3 + golang-1.18 openssh-server iputils-ping diff --git a/mkosi.skeleton/etc/sftpgo/sftpgo.json b/mkosi.skeleton/etc/sftpgo/sftpgo.json deleted file mode 100644 index 94ed367..0000000 --- a/mkosi.skeleton/etc/sftpgo/sftpgo.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "sftpd": { - "bindings": [ - { - "port": 2022, - "address": "[::1]" - }, - { - "port": 2022, - "address": "127.0.0.1" - } - ], - "host_keys": [ - "/etc/sftpgo/ed25519" - ], - "host_key_algorithms": [ - "ssh-ed25519" - ], - "kex_algorithms": [ - "curve25519-sha256@libssh.org" - ], - "ciphers": [ - "aes128-gcm@openssh.com", - "aes256-gcm@openssh.com", - "chacha20-poly1305@openssh.com" - ], - "macs": [ - "hmac-sha2-256-etm@openssh.com" - ], - "login_banner_file": "/etc/sftpgo/banner.txt", - "enabled_ssh_commands": [] - }, - "data_provider": { - "driver": "sqlite", - "name": "sftpgo.db", - "users_base_dir": "/srv/ht", - "external_auth_hook": "/srv/php/niver/sftpgo-auth.php", - "external_auth_scope": 0 - }, - "httpd": { - "bindings": [ - { - "port": 0 - } - ] - } -} diff --git a/mkosi.skeleton/etc/sftpgo/sftpgo.toml b/mkosi.skeleton/etc/sftpgo/sftpgo.toml new file mode 100644 index 0000000..0ef96ae --- /dev/null +++ b/mkosi.skeleton/etc/sftpgo/sftpgo.toml @@ -0,0 +1,40 @@ +[sftpd] +banner = "SFTPGo" +host_keys = [ + "/etc/sftpgo/ed25519" +] +host_key_algorithms = [ + "ssh-ed25519" +] +kex_algorithms = [ + "curve25519-sha256", + "curve25519-sha256@libssh.org" +] +ciphers = [ + "chacha20-poly1305@openssh.com", + "aes128-gcm@openssh.com", + "aes256-gcm@openssh.com" +] +macs = [ + "hmac-sha2-256-etm@openssh.com", + "hmac-sha2-512-etm@openssh.com" +] +login_banner_file = "/etc/sftpgo/banner.txt" +enabled_ssh_commands = [] + +[[sftpd.bindings]] +port = 2022 +address = "[::1]" + +[[sftpd.bindings]] +port = 2022 +address = "127.0.0.1" + +[data_provider] +driver = "memory" +users_base_dir = "/srv/ht" +external_auth_hook = "/srv/php/niver/sftpgo-auth.php" +external_auth_scope = 0 + +[[httpd.bindings]] +port = 0 diff --git a/mkosi.skeleton/root/build-sftpgo.sh b/mkosi.skeleton/root/build-sftpgo.sh deleted file mode 100755 index ff144b3..0000000 --- a/mkosi.skeleton/root/build-sftpgo.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash - -git clone https://github.com/drakkan/sftpgo /root/sftpgo-src -cd /root/sftpgo-src -git checkout v2.2.3 -pacman -Syu go -go build -tags nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,noportable,nometrics -o /usr/local/bin/sftpgo diff --git a/mkosi.skeleton/root/sftpgo.sh b/mkosi.skeleton/root/sftpgo.sh new file mode 100755 index 0000000..074e963 --- /dev/null +++ b/mkosi.skeleton/root/sftpgo.sh @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +source /etc/os-release +export GO=/usr/bin/go +if [[ $ID = "debian" ]]; then + export GO=/usr/lib/go-1.18/bin/go +fi + +git clone https://github.com/drakkan/sftpgo /root/sftpgo-src +cd /root/sftpgo-src +git checkout v2.2.3 +$GO build -tags nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,noportable,nometrics -o /usr/local/bin/sftpgo diff --git a/mkosi.skeleton/usr/local/bin/sftpgo b/mkosi.skeleton/usr/local/bin/sftpgo index 6a06552..661630a 100755 Binary files a/mkosi.skeleton/usr/local/bin/sftpgo and b/mkosi.skeleton/usr/local/bin/sftpgo differ