Compare commits

...

13 Commits

Author SHA1 Message Date
tteckster
0b604d204a Update build.func
Check if the shell is using bash (retry)
2024-02-21 19:51:36 -05:00
tteckster
f3e3958299 Update build.func 2024-02-21 18:47:57 -05:00
tteckster
038f70f198 Update build.func
To utilize these scripts, please switch to the Bash shell.
2024-02-21 18:40:37 -05:00
tteckster
998235e92d Update build.func
revert
2024-02-21 18:33:36 -05:00
tteckster
43de9ca99f Update build.func
revert
2024-02-21 18:26:12 -05:00
tteckster
8752a66c03 Update build.func
The use of the Bash shell is mandatory.
2024-02-21 18:21:51 -05:00
tteckster
8a05729593 Update build.func
Check if the shell is using bash shell
2024-02-21 18:03:20 -05:00
tteckster
6a0b31aee1 Update channels-install.sh
tweak
2024-02-21 15:10:23 -05:00
tteckster
26036763f7 Update unmanic-install.sh
fix GID mismatch
2024-02-21 14:21:01 -05:00
tteckster
fc41d79db4 Update channels-install.sh
fix GID mismatch
2024-02-21 14:10:55 -05:00
tteckster
779849f337 Update scrypted-install.sh
fix GID mismatch
2024-02-21 13:44:40 -05:00
tteckster
35bcc0e894 Update tdarr-install.sh
fix GID mismatch
2024-02-21 13:28:52 -05:00
tteckster
71ca43c7a2 Update install.func
The script now checks for both IPv4 and IPv6 Internet connectivity and displays the results. Only if both IPv4 and IPv6 checks fail, it will then prompt the user.
2024-02-21 12:19:48 -05:00
6 changed files with 46 additions and 32 deletions

View File

@@ -25,7 +25,7 @@ if [[ "$CTTYPE" == "0" ]]; then
msg_info "Setting Up Hardware Acceleration"
$STD apt-get -y install \
va-driver-all \
ocl-icd-libopencl1 \
ocl-icd-libopencl1 \
intel-opencl-icd
chgrp video /dev/dri
chmod 755 /dev/dri
@@ -38,7 +38,7 @@ fi
msg_info "Installing Channels DVR Server (Patience)"
cd /opt
$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"
motd_ssh

View File

@@ -110,6 +110,7 @@ fi
msg_info "Installing Scrypted"
$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_info "Creating Service"

View File

@@ -42,6 +42,7 @@ $STD unzip Tdarr_Updater.zip
rm -rf Tdarr_Updater.zip
chmod +x Tdarr_Updater
./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_info "Creating Service"

View File

@@ -37,6 +37,7 @@ fi
msg_info "Installing 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_info "Creating Service"

View File

@@ -71,8 +71,19 @@ msg_error() {
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
check_root() {
root_check() {
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
clear
msg_error "Please run this script as root."
@@ -450,10 +461,12 @@ advanced_settings() {
}
install_script() {
check_root
ssh_check
arch_check
pve_check
shell_check
root_check
arch_check
ssh_check
if systemctl is-active -q ping-instances.service; then
systemctl -q stop ping-instances.service
fi

View File

@@ -112,35 +112,33 @@ setting_up_container() {
network_check() {
set +e
trap - ERR
# Check if IPv4 is being used
if ip -o -4 addr show | grep -q "scope global"; then
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
msg_ok "IPv4 Internet Connected";
else
msg_error "IPv4 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
ipv4_connected=false
ipv6_connected=false
# Check IPv4 connectivity
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 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";
# 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
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
echo -e " 🖧 Check Network Settings"
exit 1
fi
fi