mirror of https://github.com/tteck/Proxmox.git
				
				
				
			fixes
This commit is contained in:
		
							parent
							
								
									cf6e2726e7
								
							
						
					
					
						commit
						fc15af5693
					
				| 
						 | 
					@ -0,0 +1,89 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function header_info {
 | 
				
			||||||
 | 
					clear
 | 
				
			||||||
 | 
					cat <<"EOF"
 | 
				
			||||||
 | 
					          _   __
 | 
				
			||||||
 | 
					   ______(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					  / __  / // __/ _ \/ __  /
 | 
				
			||||||
 | 
					 / /_/ / // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					 \__, /_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					/____/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ______ _   __
 | 
				
			||||||
 | 
					  / ____/(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					 / / __// // __/ _ \/ __  /
 | 
				
			||||||
 | 
					/ /_/ // // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					\____//_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					echo -e "Loading..."
 | 
				
			||||||
 | 
					APP="gitea"
 | 
				
			||||||
 | 
					var_disk="8"
 | 
				
			||||||
 | 
					var_cpu="1"
 | 
				
			||||||
 | 
					var_ram="512"
 | 
				
			||||||
 | 
					var_os="debian"
 | 
				
			||||||
 | 
					var_version="12"
 | 
				
			||||||
 | 
					variables
 | 
				
			||||||
 | 
					color
 | 
				
			||||||
 | 
					catch_errors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function default_settings() {
 | 
				
			||||||
 | 
					  CT_TYPE="1"
 | 
				
			||||||
 | 
					  PW=""
 | 
				
			||||||
 | 
					  CT_ID=$NEXTID
 | 
				
			||||||
 | 
					  HN=$NSAPP
 | 
				
			||||||
 | 
					  DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					  CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					  RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					  BRG="vmbr0"
 | 
				
			||||||
 | 
					  NET="dhcp"
 | 
				
			||||||
 | 
					  GATE=""
 | 
				
			||||||
 | 
					  APT_CACHER=""
 | 
				
			||||||
 | 
					  APT_CACHER_IP=""
 | 
				
			||||||
 | 
					  DISABLEIP6="no"
 | 
				
			||||||
 | 
					  MTU=""
 | 
				
			||||||
 | 
					  SD=""
 | 
				
			||||||
 | 
					  NS=""
 | 
				
			||||||
 | 
					  MAC=""
 | 
				
			||||||
 | 
					  VLAN=""
 | 
				
			||||||
 | 
					  SSH="no"
 | 
				
			||||||
 | 
					  VERB="no"
 | 
				
			||||||
 | 
					  echo_default
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function update_script() {
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					if [[  ! -f /lib/systemd/system/gitea.service ]]; 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)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					msg_info "Updating ${APP}"
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					systemctl stop gitea
 | 
				
			||||||
 | 
					rm -rf /usr/local/bin/gitea 
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					systemctl start gitea
 | 
				
			||||||
 | 
					apt-get update &>/dev/null
 | 
				
			||||||
 | 
					apt-get -y upgrade &>/dev/nullexit
 | 
				
			||||||
 | 
					msg_ok "Updated ${APP} to ${RELEASE}"
 | 
				
			||||||
 | 
					# else 
 | 
				
			||||||
 | 
					#   msg_ok "No update required ${APP} is already at ${RELEASE}"
 | 
				
			||||||
 | 
					# fi
 | 
				
			||||||
 | 
					exit
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					build_container
 | 
				
			||||||
 | 
					description
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_ok "Completed Successfully!\n"
 | 
				
			||||||
 | 
					echo -e "${APP} should be reachable by going to the following URL.
 | 
				
			||||||
 | 
					         ${BL}http://${IP}:3000${CL} \n"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,89 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function header_info {
 | 
				
			||||||
 | 
					clear
 | 
				
			||||||
 | 
					cat <<"EOF"
 | 
				
			||||||
 | 
					          _   __
 | 
				
			||||||
 | 
					   ______(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					  / __  / // __/ _ \/ __  /
 | 
				
			||||||
 | 
					 / /_/ / // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					 \__, /_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					/____/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ______ _   __
 | 
				
			||||||
 | 
					  / ____/(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					 / / __// // __/ _ \/ __  /
 | 
				
			||||||
 | 
					/ /_/ // // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					\____//_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					echo -e "Loading..."
 | 
				
			||||||
 | 
					APP="gitea"
 | 
				
			||||||
 | 
					var_disk="8"
 | 
				
			||||||
 | 
					var_cpu="1"
 | 
				
			||||||
 | 
					var_ram="512"
 | 
				
			||||||
 | 
					var_os="debian"
 | 
				
			||||||
 | 
					var_version="12"
 | 
				
			||||||
 | 
					variables
 | 
				
			||||||
 | 
					color
 | 
				
			||||||
 | 
					catch_errors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function default_settings() {
 | 
				
			||||||
 | 
					  CT_TYPE="1"
 | 
				
			||||||
 | 
					  PW=""
 | 
				
			||||||
 | 
					  CT_ID=$NEXTID
 | 
				
			||||||
 | 
					  HN=$NSAPP
 | 
				
			||||||
 | 
					  DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					  CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					  RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					  BRG="vmbr0"
 | 
				
			||||||
 | 
					  NET="dhcp"
 | 
				
			||||||
 | 
					  GATE=""
 | 
				
			||||||
 | 
					  APT_CACHER=""
 | 
				
			||||||
 | 
					  APT_CACHER_IP=""
 | 
				
			||||||
 | 
					  DISABLEIP6="no"
 | 
				
			||||||
 | 
					  MTU=""
 | 
				
			||||||
 | 
					  SD=""
 | 
				
			||||||
 | 
					  NS=""
 | 
				
			||||||
 | 
					  MAC=""
 | 
				
			||||||
 | 
					  VLAN=""
 | 
				
			||||||
 | 
					  SSH="no"
 | 
				
			||||||
 | 
					  VERB="no"
 | 
				
			||||||
 | 
					  echo_default
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function update_script() {
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					if [[  ! -f /lib/systemd/system/gitea.service ]]; 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)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					msg_info "Updating ${APP}"
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE#v /gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					systemctl stop gitea
 | 
				
			||||||
 | 
					rm -rf /usr/local/bin/gitea 
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					systemctl start gitea
 | 
				
			||||||
 | 
					apt-get update &>/dev/null
 | 
				
			||||||
 | 
					apt-get -y upgrade &>/dev/nullexit
 | 
				
			||||||
 | 
					msg_ok "Updated ${APP} to ${RELEASE}"
 | 
				
			||||||
 | 
					# else 
 | 
				
			||||||
 | 
					#   msg_ok "No update required ${APP} is already at ${RELEASE}"
 | 
				
			||||||
 | 
					# fi
 | 
				
			||||||
 | 
					exit
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					build_container
 | 
				
			||||||
 | 
					description
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_ok "Completed Successfully!\n"
 | 
				
			||||||
 | 
					echo -e "${APP} should be reachable by going to the following URL.
 | 
				
			||||||
 | 
					         ${BL}http://${IP}:3000${CL} \n"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,89 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function header_info {
 | 
				
			||||||
 | 
					clear
 | 
				
			||||||
 | 
					cat <<"EOF"
 | 
				
			||||||
 | 
					          _   __
 | 
				
			||||||
 | 
					   ______(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					  / __  / // __/ _ \/ __  /
 | 
				
			||||||
 | 
					 / /_/ / // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					 \__, /_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					/____/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ______ _   __
 | 
				
			||||||
 | 
					  / ____/(_)_/ /___  ____ _
 | 
				
			||||||
 | 
					 / / __// // __/ _ \/ __  /
 | 
				
			||||||
 | 
					/ /_/ // // /_/  __/ /_/ /
 | 
				
			||||||
 | 
					\____//_/ \__/\___/\__,_/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					echo -e "Loading..."
 | 
				
			||||||
 | 
					APP="gitea"
 | 
				
			||||||
 | 
					var_disk="8"
 | 
				
			||||||
 | 
					var_cpu="1"
 | 
				
			||||||
 | 
					var_ram="512"
 | 
				
			||||||
 | 
					var_os="debian"
 | 
				
			||||||
 | 
					var_version="12"
 | 
				
			||||||
 | 
					variables
 | 
				
			||||||
 | 
					color
 | 
				
			||||||
 | 
					catch_errors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function default_settings() {
 | 
				
			||||||
 | 
					  CT_TYPE="1"
 | 
				
			||||||
 | 
					  PW=""
 | 
				
			||||||
 | 
					  CT_ID=$NEXTID
 | 
				
			||||||
 | 
					  HN=$NSAPP
 | 
				
			||||||
 | 
					  DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					  CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					  RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					  BRG="vmbr0"
 | 
				
			||||||
 | 
					  NET="dhcp"
 | 
				
			||||||
 | 
					  GATE=""
 | 
				
			||||||
 | 
					  APT_CACHER=""
 | 
				
			||||||
 | 
					  APT_CACHER_IP=""
 | 
				
			||||||
 | 
					  DISABLEIP6="no"
 | 
				
			||||||
 | 
					  MTU=""
 | 
				
			||||||
 | 
					  SD=""
 | 
				
			||||||
 | 
					  NS=""
 | 
				
			||||||
 | 
					  MAC=""
 | 
				
			||||||
 | 
					  VLAN=""
 | 
				
			||||||
 | 
					  SSH="no"
 | 
				
			||||||
 | 
					  VERB="no"
 | 
				
			||||||
 | 
					  echo_default
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function update_script() {
 | 
				
			||||||
 | 
					header_info
 | 
				
			||||||
 | 
					if [[  ! -f /lib/systemd/system/gitea.service ]]; 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)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					msg_info "Updating ${APP}"
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					systemctl stop gitea
 | 
				
			||||||
 | 
					rm -rf /usr/local/bin/gitea 
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					systemctl start gitea
 | 
				
			||||||
 | 
					apt-get update &>/dev/null
 | 
				
			||||||
 | 
					apt-get -y upgrade &>/dev/nullexit
 | 
				
			||||||
 | 
					msg_ok "Updated ${APP} to ${RELEASE}"
 | 
				
			||||||
 | 
					# else 
 | 
				
			||||||
 | 
					#   msg_ok "No update required ${APP} is already at ${RELEASE}"
 | 
				
			||||||
 | 
					# fi
 | 
				
			||||||
 | 
					exit
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					build_container
 | 
				
			||||||
 | 
					description
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_ok "Completed Successfully!\n"
 | 
				
			||||||
 | 
					echo -e "${APP} should be reachable by going to the following URL.
 | 
				
			||||||
 | 
					         ${BL}http://${IP}:3000${CL} \n"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					#wget https://dl.gitea.com/gitea/1.20.3/gitea-1.20.3-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					#wget https://dl.gitea.com/gitea/1.20.3/gitea-1.20.3-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,79 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King 
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: 
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd 
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd ()
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd (alpard.net)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /usr/local/bin/gitea
 | 
				
			||||||
 | 
					chmod +x /usr/local/bin/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,81 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd (alpard.net)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					msg_ok "Installed Gitea"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,80 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd (alpard.net)
 | 
				
			||||||
 | 
					# License: MIT
 | 
				
			||||||
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 git
 | 
				
			||||||
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$STD apt-get install -y mc
 | 
				
			||||||
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Installing Gitea"
 | 
				
			||||||
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
 | 
					mv gitea* /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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Creating directory structure"
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=Gitea (Git with a cup of tea)
 | 
				
			||||||
 | 
					After=syslog.target
 | 
				
			||||||
 | 
					After=network.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
 | 
				
			||||||
 | 
					# LimitNOFILE=524288:524288
 | 
				
			||||||
 | 
					RestartSec=2s
 | 
				
			||||||
 | 
					Type=notify
 | 
				
			||||||
 | 
					User=gitea
 | 
				
			||||||
 | 
					Group=gitea
 | 
				
			||||||
 | 
					#The mount point we added to the container
 | 
				
			||||||
 | 
					WorkingDirectory=/var/lib/gitea
 | 
				
			||||||
 | 
					#Create directory in /run
 | 
				
			||||||
 | 
					RuntimeDirectory=gitea
 | 
				
			||||||
 | 
					ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
 | 
				
			||||||
 | 
					Restart=always
 | 
				
			||||||
 | 
					Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
 | 
				
			||||||
 | 
					WatchdogSec=30s
 | 
				
			||||||
 | 
					#Capabilities to bind to low-numbered ports
 | 
				
			||||||
 | 
					CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					motd_ssh
 | 
				
			||||||
 | 
					customize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					msg_info "Cleaning up"
 | 
				
			||||||
 | 
					$STD apt-get -y autoremove
 | 
				
			||||||
 | 
					$STD apt-get -y autoclean
 | 
				
			||||||
 | 
					msg_ok "Cleaned"
 | 
				
			||||||
| 
						 | 
					@ -2,6 +2,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copyright (c) 2021-2024 tteck
 | 
					# Copyright (c) 2021-2024 tteck
 | 
				
			||||||
# Author: tteck (tteckster)
 | 
					# Author: tteck (tteckster)
 | 
				
			||||||
 | 
					# Co-author: Rogue-King
 | 
				
			||||||
 | 
					# Base Script: apalrd (alpard.net)
 | 
				
			||||||
# License: MIT
 | 
					# License: MIT
 | 
				
			||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
					# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,15 +18,16 @@ 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 sudo
 | 
					$STD apt-get install -y sudo
 | 
				
			||||||
 | 
					$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)
 | 
					RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
VERSION=${RELEASE#v}
 | 
					VERSION=${RELEASE#v}
 | 
				
			||||||
wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
					wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
 | 
				
			||||||
#wget https://dl.gitea.com/gitea/1.20.3/gitea-1.20.3-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"
 | 
					msg_info "Creating Gitea user"
 | 
				
			||||||
adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
					adduser --system --group --disabled-password --home /etc/gitea gitea
 | 
				
			||||||
| 
						 | 
					@ -35,7 +38,6 @@ 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_ok "Installed Gitea"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat <<EOF >/etc/systemd/system/gitea.service
 | 
					cat <<EOF >/etc/systemd/system/gitea.service
 | 
				
			||||||
[Unit]
 | 
					[Unit]
 | 
				
			||||||
| 
						 | 
					@ -65,6 +67,7 @@ AmbientCapabilities=CAP_NET_BIND_SERVICE
 | 
				
			||||||
[Install]
 | 
					[Install]
 | 
				
			||||||
WantedBy=multi-user.target
 | 
					WantedBy=multi-user.target
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					systemctl daemon-reload
 | 
				
			||||||
systemctl enable -q --now gitea
 | 
					systemctl enable -q --now gitea
 | 
				
			||||||
msg_ok "Created Service"
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue