Compare commits
No commits in common. "a3b1db3251730396599cceebfaf8888e5f0d2d54" and "3f0f22cedbe8ab780a6e0c03f7152fee359ac414" have entirely different histories.
a3b1db3251
...
3f0f22cedb
@ -37,15 +37,7 @@ installWireguard()
|
|||||||
echo "---- $menu_number. Checking if $app_name can be installed."
|
echo "---- $menu_number. Checking if $app_name can be installed."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Host-conflict guard: a host-level WireGuard (e.g. the angristan
|
dockerCheckAllowedInstall "$app_name" || return 1
|
||||||
# wireguard-install script — marker /etc/wireguard/params) collides with
|
|
||||||
# this container on the wg kernel module + UDP 51820. Abort if present.
|
|
||||||
if [[ -e /etc/wireguard/params ]]; then
|
|
||||||
isError "WireGuard is already installed on the host — this conflicts with the $app_name app."
|
|
||||||
isError "Installation is now aborting..."
|
|
||||||
dockerUninstallApp "$app_name"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
((menu_number++))
|
((menu_number++))
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
39
scripts/docker/app/checks/allowed_install.sh
Executable file
39
scripts/docker/app/checks/allowed_install.sh
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
dockerCheckAllowedInstall()
|
||||||
|
{
|
||||||
|
local app_name="$1"
|
||||||
|
|
||||||
|
#if [ "$status" == "installed" ]; then
|
||||||
|
#elif [ "$status" == "running" ]; then
|
||||||
|
#elif [ "$status" == "not_installed" ]; then
|
||||||
|
#elif [ "$status" == "invalid_flag" ]; then
|
||||||
|
|
||||||
|
case "$app_name" in
|
||||||
|
"wireguard")
|
||||||
|
# Check if WireGuard is already installed and load params
|
||||||
|
if [[ -e /etc/wireguard/params ]]; then
|
||||||
|
isError "WireGuard is installed, this will conflict with $app_name."
|
||||||
|
isError "Installation is now aborting..."
|
||||||
|
dockerUninstallApp "$app_name"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
#"mailcow")
|
||||||
|
#local status=$(dockerCheckAppInstalled "webmin" "linux" "check_active")
|
||||||
|
#if [ "$status" == "installed" ]; then
|
||||||
|
#isError "Virtualmin is installed, this will conflict with $app_name."
|
||||||
|
#isError "Installation is now aborting..."
|
||||||
|
#dockerUninstallApp "$app_name"
|
||||||
|
|
||||||
|
#elif [ "$status" == "running" ]; then
|
||||||
|
#isError "Virtualmin is installed, this will conflict with $app_name."
|
||||||
|
#isError "Installation is now aborting..."
|
||||||
|
#dockerUninstallApp "$app_name"
|
||||||
|
|
||||||
|
#fi
|
||||||
|
#;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
isSuccessful "Application is allowed to be installed."
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@
|
|||||||
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
|
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
|
||||||
|
|
||||||
docker_scripts=(
|
docker_scripts=(
|
||||||
|
"docker/app/checks/allowed_install.sh"
|
||||||
"docker/app/checks/app_installed.sh"
|
"docker/app/checks/app_installed.sh"
|
||||||
"docker/app/checks/container_health_loop.sh"
|
"docker/app/checks/container_health_loop.sh"
|
||||||
"docker/app/checks/container_health.sh"
|
"docker/app/checks/container_health.sh"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user