forked from forkanization/Proxmox-arm64
Merge branch 'main-upstream'
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<h3 align="center">All notable changes to this project will be documented in this file.</h3>
|
||||
|
||||
- The website source is private and will not be made open-source to help prevent copycat/coat-tailing sites from exploiting the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/.
|
||||
- Be cautious of copycat or coat-tailing sites that exploit the project's popularity with potentially malicious intent. Please only trust information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/.
|
||||
|
||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
|
||||
|
||||
@@ -57,22 +57,20 @@ function default_settings() {
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
|
||||
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
|
||||
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping ErsatzTV"
|
||||
systemctl stop ersatzTV
|
||||
msg_ok "Stopped ErsatzTV"
|
||||
|
||||
msg_info "Updating ErsatzTV"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
|
||||
if [ -d /opt/ErsatzTV/ErsatzTV_bak ]; then
|
||||
rm -rf /opt/ErsatzTV/ErsatzTV_bak
|
||||
fi
|
||||
mv /opt/ErsatzTV/ErsatzTV /opt/ErsatzTV/ErsatzTV_bak
|
||||
cp -R /opt/ErsatzTV/ ErsatzTV-backup
|
||||
rm ErsatzTV-backup/ErsatzTV
|
||||
rm -rf /opt/ErsatzTV
|
||||
wget -qO- "https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE}/ErsatzTV-${RELEASE}-linux-arm64.tar.gz" | tar -xz -C /opt
|
||||
mv "/opt/ErsatzTV-${RELEASE}-linux-arm64" /opt/ErsatzTV
|
||||
cp -R ErsatzTV-backup/* /opt/ErsatzTV/
|
||||
rm -rf ErsatzTV-backup
|
||||
msg_ok "Updated ErsatzTV"
|
||||
|
||||
msg_info "Starting ErsatzTV"
|
||||
|
||||
@@ -17,6 +17,10 @@ cat <<"EOF"
|
||||
EOF
|
||||
}
|
||||
header_info
|
||||
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
|
||||
echo "AVX instruction set is not supported on this CPU."
|
||||
exit
|
||||
fi
|
||||
echo -e "Loading..."
|
||||
APP="Unifi"
|
||||
var_disk="8"
|
||||
|
||||
@@ -128,6 +128,9 @@ function update_script() {
|
||||
if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi
|
||||
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
|
||||
sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env
|
||||
if [[ -f /opt/vaultwarden/data/config.json ]]; then
|
||||
sed -i "s|\"admin_token\":.*|\"admin_token\": \"${TOKEN}\"|" /opt/vaultwarden/data/config.json
|
||||
fi
|
||||
systemctl restart vaultwarden
|
||||
fi
|
||||
exit
|
||||
|
||||
@@ -87,7 +87,10 @@ msg_error() {
|
||||
setting_up_container() {
|
||||
msg_info "Setting up Container OS"
|
||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
|
||||
echo "LANG=${locale_line}" >/etc/default/locale
|
||||
locale-gen >/dev/null
|
||||
export LANG=${locale_line}
|
||||
echo $tz >/etc/timezone
|
||||
ln -sf /usr/share/zoneinfo/$tz /etc/localtime
|
||||
for ((i = RETRY_NUM; i > 0; i--)); do
|
||||
|
||||
@@ -428,7 +428,7 @@ nfs | dir)
|
||||
DISK_IMPORT="-format raw"
|
||||
THIN=""
|
||||
;;
|
||||
btrfs)
|
||||
btrfs | local-zfs)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
|
||||
Reference in New Issue
Block a user