mirror of https://github.com/tteck/Proxmox.git
Compare commits
13 Commits
c0e3edc0c9
...
0b604d204a
Author | SHA1 | Date |
---|---|---|
|
0b604d204a | |
|
f3e3958299 | |
|
038f70f198 | |
|
998235e92d | |
|
43de9ca99f | |
|
8752a66c03 | |
|
8a05729593 | |
|
6a0b31aee1 | |
|
26036763f7 | |
|
fc41d79db4 | |
|
779849f337 | |
|
35bcc0e894 | |
|
71ca43c7a2 |
|
@ -25,7 +25,7 @@ if [[ "$CTTYPE" == "0" ]]; then
|
||||||
msg_info "Setting Up Hardware Acceleration"
|
msg_info "Setting Up Hardware Acceleration"
|
||||||
$STD apt-get -y install \
|
$STD apt-get -y install \
|
||||||
va-driver-all \
|
va-driver-all \
|
||||||
ocl-icd-libopencl1 \
|
ocl-icd-libopencl1 \
|
||||||
intel-opencl-icd
|
intel-opencl-icd
|
||||||
chgrp video /dev/dri
|
chgrp video /dev/dri
|
||||||
chmod 755 /dev/dri
|
chmod 755 /dev/dri
|
||||||
|
@ -38,7 +38,7 @@ fi
|
||||||
msg_info "Installing Channels DVR Server (Patience)"
|
msg_info "Installing Channels DVR Server (Patience)"
|
||||||
cd /opt
|
cd /opt
|
||||||
$STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh)
|
$STD bash <(curl -fsSL https://getchannels.com/dvr/setup.sh)
|
||||||
# adduser $(id -u -n) video && adduser $(id -u -n) render
|
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
|
||||||
msg_ok "Installed Channels DVR Server"
|
msg_ok "Installed Channels DVR Server"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|
|
@ -110,6 +110,7 @@ fi
|
||||||
|
|
||||||
msg_info "Installing Scrypted"
|
msg_info "Installing Scrypted"
|
||||||
$STD npx -y scrypted@latest install-server
|
$STD npx -y scrypted@latest install-server
|
||||||
|
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
|
||||||
msg_ok "Installed Scrypted"
|
msg_ok "Installed Scrypted"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|
|
@ -42,6 +42,7 @@ $STD unzip Tdarr_Updater.zip
|
||||||
rm -rf Tdarr_Updater.zip
|
rm -rf Tdarr_Updater.zip
|
||||||
chmod +x Tdarr_Updater
|
chmod +x Tdarr_Updater
|
||||||
./Tdarr_Updater &>/dev/null
|
./Tdarr_Updater &>/dev/null
|
||||||
|
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
|
||||||
msg_ok "Installed Tdarr"
|
msg_ok "Installed Tdarr"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|
|
@ -37,6 +37,7 @@ fi
|
||||||
|
|
||||||
msg_info "Installing Unmanic"
|
msg_info "Installing Unmanic"
|
||||||
$STD pip3 install unmanic
|
$STD pip3 install unmanic
|
||||||
|
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
|
||||||
msg_ok "Installed Unmanic"
|
msg_ok "Installed Unmanic"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|
|
@ -71,8 +71,19 @@ msg_error() {
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if the shell is using bash
|
||||||
|
shell_check() {
|
||||||
|
if [[ "$(basename "$SHELL")" != "bash" ]]; then
|
||||||
|
clear
|
||||||
|
msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell."
|
||||||
|
echo -e "\nExiting..."
|
||||||
|
sleep 2
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Run as root only
|
# Run as root only
|
||||||
check_root() {
|
root_check() {
|
||||||
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
||||||
clear
|
clear
|
||||||
msg_error "Please run this script as root."
|
msg_error "Please run this script as root."
|
||||||
|
@ -450,10 +461,12 @@ advanced_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_script() {
|
install_script() {
|
||||||
check_root
|
|
||||||
ssh_check
|
|
||||||
arch_check
|
|
||||||
pve_check
|
pve_check
|
||||||
|
shell_check
|
||||||
|
root_check
|
||||||
|
arch_check
|
||||||
|
ssh_check
|
||||||
|
|
||||||
if systemctl is-active -q ping-instances.service; then
|
if systemctl is-active -q ping-instances.service; then
|
||||||
systemctl -q stop ping-instances.service
|
systemctl -q stop ping-instances.service
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -112,35 +112,33 @@ setting_up_container() {
|
||||||
network_check() {
|
network_check() {
|
||||||
set +e
|
set +e
|
||||||
trap - ERR
|
trap - ERR
|
||||||
# Check if IPv4 is being used
|
ipv4_connected=false
|
||||||
if ip -o -4 addr show | grep -q "scope global"; then
|
ipv6_connected=false
|
||||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
|
|
||||||
msg_ok "IPv4 Internet Connected";
|
# Check IPv4 connectivity
|
||||||
else
|
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
|
||||||
msg_error "IPv4 Internet Not Connected";
|
msg_ok "IPv4 Internet Connected";
|
||||||
read -r -p "Would you like to continue anyway? <y/N> " prompt
|
ipv4_connected=true
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
else
|
||||||
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
|
msg_error "IPv4 Internet Not Connected";
|
||||||
else
|
|
||||||
echo -e " 🖧 Check Network Settings"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if IPv6 is being used
|
# Check IPv6 connectivity
|
||||||
if ip -o -6 addr show | grep -q "scope global"; then
|
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then
|
||||||
if ping -6 google.com &>/dev/null; then
|
msg_ok "IPv6 Internet Connected";
|
||||||
msg_ok "IPv6 Internet Connected";
|
ipv6_connected=true
|
||||||
|
else
|
||||||
|
msg_error "IPv6 Internet Not Connected";
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If both IPv4 and IPv6 checks fail, prompt the user
|
||||||
|
if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then
|
||||||
|
read -r -p "No Internet detected,would you like to continue anyway? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
|
||||||
else
|
else
|
||||||
msg_error "IPv6 Internet Not Connected";
|
echo -e " 🖧 Check Network Settings"
|
||||||
read -r -p "Would you like to continue anyway? <y/N> " prompt
|
exit 1
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
|
|
||||||
else
|
|
||||||
echo -e " 🖧 Check Network Settings"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue