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" 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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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