ProxmoxVE/install/sftpgo-install.sh

50 lines
1.4 KiB
Bash
Raw Normal View History

2024-01-07 17:00:24 +00:00
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
2024-01-07 17:00:24 +00:00
# Author: tteck (tteckster)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
2024-01-07 17:00:24 +00:00
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y gpg
$STD apt-get install -y sqlite3
msg_ok "Installed Dependencies"
msg_info "Installing Golang"
set +o pipefail
temp_file=$(mktemp)
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
tar -C /usr/local -xzf "$temp_file"
ln -sf /usr/local/go/bin/go /usr/local/bin/go
rm -f "$temp_file"
2024-01-07 17:00:24 +00:00
set -o pipefail
msg_ok "Installed Golang"
msg_info "Installing SFTPGo"
curl -sS https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt bookworm main" >/etc/apt/sources.list.d/sftpgo.list
$STD apt-get update
$STD apt-get install -y sftpgo
msg_ok "Installed SFTPGo"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf $RELEASE
2024-06-02 12:00:22 +00:00
$STD apt-get -y autoremove
$STD apt-get -y autoclean
2024-01-07 17:00:24 +00:00
msg_ok "Cleaned"