mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-09 20:41:02 +02:00
Breaking Change: Migrate all "Alpine" Scripts to Normal CT's (#16587)
This commit is contained in:
committed by
GitHub
parent
f0b236ec77
commit
92e72e4137
+38
-20
@@ -14,27 +14,28 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
sqlite3
|
||||
msg_ok "Installed Dependencies"
|
||||
setup_deb_based() {
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
sqlite3
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-$(arch_resolve)"
|
||||
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-$(arch_resolve)"
|
||||
|
||||
msg_info "Configuring Gitea"
|
||||
chmod +x /usr/local/bin/gitea
|
||||
$STD adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea
|
||||
mkdir -p /var/lib/gitea/{custom,data,log}
|
||||
chown -R gitea:gitea /var/lib/gitea/
|
||||
chmod -R 750 /var/lib/gitea/
|
||||
chown root:gitea /etc/gitea
|
||||
chmod 770 /etc/gitea
|
||||
sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh
|
||||
msg_ok "Configured Gitea"
|
||||
msg_info "Configuring Gitea"
|
||||
chmod +x /usr/local/bin/gitea
|
||||
$STD adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea
|
||||
mkdir -p /var/lib/gitea/{custom,data,log}
|
||||
chown -R gitea:gitea /var/lib/gitea/
|
||||
chmod -R 750 /var/lib/gitea/
|
||||
chown root:gitea /etc/gitea
|
||||
chmod 770 /etc/gitea
|
||||
sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh
|
||||
msg_ok "Configured Gitea"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/gitea.service
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/gitea.service
|
||||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=syslog.target
|
||||
@@ -64,8 +65,25 @@ Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now gitea
|
||||
msg_ok "Created Service"
|
||||
systemctl enable -q --now gitea
|
||||
msg_ok "Created Service"
|
||||
}
|
||||
|
||||
setup_alpine() {
|
||||
msg_info "Installing Gitea"
|
||||
$STD apk add --no-cache gitea
|
||||
msg_ok "Installed Gitea"
|
||||
|
||||
msg_info "Enabling Gitea Service"
|
||||
$STD rc-update add gitea default
|
||||
msg_ok "Enabled Gitea Service"
|
||||
|
||||
msg_info "Starting Gitea"
|
||||
$STD service gitea start
|
||||
msg_ok "Started Gitea"
|
||||
}
|
||||
|
||||
run_os_setup
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
Reference in New Issue
Block a user