Compare commits

..

No commits in common. "0b604d204a174e567477e38ef75c6e4f1e90a9a2" and "c0e3edc0c90479922583d98078b8fc43024e0946" have entirely different histories.

6 changed files with 34 additions and 48 deletions

View File

@ -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)
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group # adduser $(id -u -n) video && adduser $(id -u -n) render
msg_ok "Installed Channels DVR Server" msg_ok "Installed Channels DVR Server"
motd_ssh motd_ssh

View File

@ -110,7 +110,6 @@ 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"

View File

@ -42,7 +42,6 @@ $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"

View File

@ -37,7 +37,6 @@ 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"

View File

@ -71,19 +71,8 @@ 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
root_check() { check_root() {
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."
@ -461,12 +450,10 @@ advanced_settings() {
} }
install_script() { install_script() {
pve_check check_root
shell_check
root_check
arch_check
ssh_check ssh_check
arch_check
pve_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

View File

@ -112,33 +112,35 @@ setting_up_container() {
network_check() { network_check() {
set +e set +e
trap - ERR trap - ERR
ipv4_connected=false # Check if IPv4 is being used
ipv6_connected=false if ip -o -4 addr show | grep -q "scope global"; then
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
# Check IPv4 connectivity msg_ok "IPv4 Internet Connected";
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
msg_ok "IPv4 Internet Connected";
ipv4_connected=true
else
msg_error "IPv4 Internet Not Connected";
fi
# Check IPv6 connectivity
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then
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
echo -e " 🖧 Check Network Settings" msg_error "IPv4 Internet Not Connected";
exit 1 read -r -p "Would you like to continue anyway? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
else
echo -e " 🖧 Check Network Settings"
exit 1
fi
fi
fi
# Check if IPv6 is being used
if ip -o -6 addr show | grep -q "scope global"; then
if ping -6 google.com &>/dev/null; then
msg_ok "IPv6 Internet Connected";
else
msg_error "IPv6 Internet Not Connected";
read -r -p "Would you like to continue anyway? <y/N> " prompt
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