mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-15 19:53:31 +01:00
Refactor (#6822)
This commit is contained in:
@ -17,11 +17,9 @@ msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y apache2-utils
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Zot Registry"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/project-zot/zot/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL "https://github.com/project-zot/zot/releases/download/${RELEASE}/zot-linux-amd64" -o /usr/bin/zot
|
||||
chmod +x /usr/bin/zot
|
||||
chown root:root /usr/bin/zot
|
||||
fetch_and_deploy_gh_release "zot" "project-zot/zot" "singlefile" "latest" "/usr/bin" "zot-linux-amd64"
|
||||
|
||||
msg_info "Configuring Zot Registry"
|
||||
mkdir -p /etc/zot
|
||||
curl -fsSL https://raw.githubusercontent.com/project-zot/zot/refs/heads/main/examples/config-ui.json -o /etc/zot/config.json
|
||||
ZOTPASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
@ -31,8 +29,7 @@ $STD htpasswd -b -B -c /etc/zot/htpasswd admin "$ZOTPASSWORD"
|
||||
echo "Zot User: admin"
|
||||
echo "Zot Password: $ZOTPASSWORD"
|
||||
} >>~/zot.creds
|
||||
echo "${RELEASE}" >~/.${APPLICATION}
|
||||
msg_ok "Installed Zot Registry"
|
||||
msg_ok "Configured Zot Registry"
|
||||
|
||||
msg_info "Setup Service"
|
||||
cat <<EOF >/etc/systemd/system/zot.service
|
||||
|
||||
Reference in New Issue
Block a user