mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "fee58193321a2afd8822d04128a61df357794b5b" and "f190221638941d7f6c8bfe5518fb6dcdec9c05f5" have entirely different histories.
fee5819332
...
f190221638
21
ct/gitea.sh
21
ct/gitea.sh
|
@ -9,18 +9,18 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
______ _ __
|
_ __
|
||||||
/ ____/(_)/ /____ ____ _
|
______(_)/ /____ ____ _
|
||||||
/ / __// // __/ _ \/ __ /
|
/ __ / // __/ _ \/ __ /
|
||||||
/ /_/ // // /_/ __/ /_/ /
|
/ /_/ / // /_/ __/ /_/ /
|
||||||
\____//_/ \__/\___/\__,_/
|
\__, /_/ \__/\___/\__,_/
|
||||||
|
/____/
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
header_info
|
header_info
|
||||||
echo -e "Loading..."
|
echo -e "Loading..."
|
||||||
APP="Gitea"
|
APP="gitea"
|
||||||
var_disk="8"
|
var_disk="8"
|
||||||
var_cpu="1"
|
var_cpu="1"
|
||||||
var_ram="512"
|
var_ram="512"
|
||||||
|
@ -57,9 +57,10 @@ function default_settings() {
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
VERSION=${RELEASE#v}
|
||||||
wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
|
msg_info "Updating gitea to ${RELEASE}"
|
||||||
|
wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
|
||||||
systemctl stop gitea
|
systemctl stop gitea
|
||||||
rm -rf /usr/local/bin/gitea
|
rm -rf /usr/local/bin/gitea
|
||||||
mv gitea* /usr/local/bin/gitea
|
mv gitea* /usr/local/bin/gitea
|
||||||
|
|
|
@ -15,21 +15,21 @@ setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y --no-install-recommends \
|
||||||
$STD apt-get install -y sudo
|
ffmpeg \
|
||||||
$STD apt-get install -y mc
|
build-essential \
|
||||||
|
unzip \
|
||||||
|
pkg-config \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing FFmpeg (Patience)"
|
|
||||||
echo "deb http://deb.debian.org/debian/ sid main" >/etc/apt/sources.list.d/sid.list
|
|
||||||
$STD apt update
|
|
||||||
DEBIAN_FRONTEND=noninteractive $STD apt install -t sid ffmpeg -y
|
|
||||||
rm /etc/apt/sources.list.d/sid.list
|
|
||||||
$STD apt update
|
|
||||||
msg_ok "Installed FFmpeg"
|
|
||||||
|
|
||||||
msg_info "Installing ErsatzTV"
|
msg_info "Installing ErsatzTV "
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
|
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
|
||||||
wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt
|
wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-x64.tar.gz" | tar -xz -C /opt
|
||||||
mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV
|
mv "/opt/ErsatzTV-${RELEASE}-linux-x64" /opt/ErsatzTV
|
||||||
|
|
|
@ -16,23 +16,27 @@ update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y git
|
$STD apt-get install -y git
|
||||||
$STD apt-get install -y curl
|
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Gitea"
|
msg_info "Installing Gitea"
|
||||||
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
|
VERSION=${RELEASE#v}
|
||||||
|
$STD wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
|
||||||
mv gitea* /usr/local/bin/gitea
|
mv gitea* /usr/local/bin/gitea
|
||||||
chmod +x /usr/local/bin/gitea
|
chmod +x /usr/local/bin/gitea
|
||||||
|
msg_info "Installed Gitea"
|
||||||
|
|
||||||
|
msg_info "Creating Gitea user"
|
||||||
adduser --system --group --disabled-password --home /etc/gitea gitea > /dev/null
|
adduser --system --group --disabled-password --home /etc/gitea gitea > /dev/null
|
||||||
|
|
||||||
|
msg_info "Creating directory structure"
|
||||||
mkdir -p /var/lib/gitea/{custom,data,log}
|
mkdir -p /var/lib/gitea/{custom,data,log}
|
||||||
chown -R gitea:gitea /var/lib/gitea/
|
chown -R gitea:gitea /var/lib/gitea/
|
||||||
chmod -R 750 /var/lib/gitea/
|
chmod -R 750 /var/lib/gitea/
|
||||||
chown root:gitea /etc/gitea
|
chown root:gitea /etc/gitea
|
||||||
chmod 770 /etc/gitea
|
chmod 770 /etc/gitea
|
||||||
msg_info "Installed Gitea"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/gitea.service
|
cat <<EOF >/etc/systemd/system/gitea.service
|
||||||
|
|
Loading…
Reference in New Issue