#!/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.3.1 $GO build -tags nometrics,noazblob,nogcs,nos3,nobolt,nomysql,nopgsql,nosqlite,noportable -o /usr/local/bin/sftpgo