install_easy: generic linux easy setup

This commit is contained in:
bol-van 2021-11-15 18:09:08 +03:00
parent b8e5fcb907
commit 57f2d71782

View File

@ -165,8 +165,13 @@ check_system()
SYSTEM=openrc SYSTEM=openrc
else else
echo system is not either systemd, openrc or openwrt based echo system is not either systemd, openrc or openwrt based
echo check readme.txt for manual setup info. echo easy installer can set up config settings but can\'t configure auto start
exitp 5 echo you have to do it manually. check readme.txt for manual setup info.
if ask_yes_no N "do you want to continue"; then
SYSTEM=linux
else
exitp 5
fi
fi fi
elif [ "$UNAME" = "Darwin" ]; then elif [ "$UNAME" = "Darwin" ]; then
SYSTEM=macos SYSTEM=macos
@ -989,6 +994,31 @@ install_openrc()
} }
install_linux()
{
INIT_SCRIPT_SRC="$EXEDIR/init.d/sysv/zapret"
check_bins
require_root
check_location copy_all
check_prerequisites_linux
install_binaries
check_dns
select_ipv6
ask_config
download_list
crontab_del_quiet
# desktop system. more likely up at daytime
crontab_add 10 22
echo
echo '!!! WARNING. YOUR SETUP IS INCOMPLETE !!!'
echo you must manually add to auto start : $INIT_SCRIPT_SRC start
echo make sure it\'s executed after your custom/firewall iptables configuration
echo "if your system uses sysv init : ln -fs $INIT_SCRIPT_SRC /etc/init.d/zapret ; chkconfig zapret on"
}
check_kmod() check_kmod()
{ {
[ -f "/lib/modules/$(uname -r)/$1.ko" ] [ -f "/lib/modules/$(uname -r)/$1.ko" ]
@ -1348,6 +1378,9 @@ case $SYSTEM in
openrc) openrc)
install_openrc install_openrc
;; ;;
linux)
install_linux
;;
openwrt) openwrt)
install_openwrt install_openwrt
;; ;;