Browse Source

SFTPGo: new build script + TOML config

main
Miraty 3 months ago
parent
commit
dc3dad842b
  1. 1
      mkosi.default.d/arch/mkosi.default
  2. 1
      mkosi.default.d/debian/mkosi.default
  3. 47
      mkosi.skeleton/etc/sftpgo/sftpgo.json
  4. 40
      mkosi.skeleton/etc/sftpgo/sftpgo.toml
  5. 7
      mkosi.skeleton/root/build-sftpgo.sh
  6. 12
      mkosi.skeleton/root/sftpgo.sh
  7. BIN
      mkosi.skeleton/usr/local/bin/sftpgo

1
mkosi.default.d/arch/mkosi.default

@ -11,6 +11,7 @@ Packages =
nginx-mod-headers-more
certbot-nginx
php-sqlite
go
openssh
iputils
which

1
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

47
mkosi.skeleton/etc/sftpgo/sftpgo.json

@ -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
}
]
}
}

40
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

7
mkosi.skeleton/root/build-sftpgo.sh

@ -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

12
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

BIN
mkosi.skeleton/usr/local/bin/sftpgo

Binary file not shown.
Loading…
Cancel
Save