mirror of
https://github.com/ublue-os/forge.git
synced 2025-04-18 20:43:43 +03:00
feat: check if user use unprivileged port 80
This commit is contained in:
parent
d855d03eb9
commit
c691ebaeac
12
forge.sh
12
forge.sh
|
@ -125,6 +125,18 @@ function check_prerequisites {
|
||||||
echo -e "${GREEN}podman socket is ${PODMAN_SERVICE_STATUS}${ENDCOLOR}"
|
echo -e "${GREEN}podman socket is ${PODMAN_SERVICE_STATUS}${ENDCOLOR}"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
echo -e "${YELLOW}Checking net.ipv4.ip_unprivileged_port_start${ENDCOLOR}"
|
||||||
|
NET_IPV4_UNPRIV_PORT_START="$(sysctl -n net.ipv4.ip_unprivileged_port_start)"
|
||||||
|
if [ "${NET_IPV4_UNPRIV_PORT_START}" -gt 80 ];
|
||||||
|
then
|
||||||
|
echo -e "${RED}Your net.ipv4.ip_unprivileged_port_start is set to ${NET_IPV4_UNPRIV_PORT_START}${ENDCOLOR}"
|
||||||
|
echo -e "${RED}Make sure to configure net.ipv4.ip_unprivileged_port_start to <= 80${ENDCOLOR}"
|
||||||
|
echo -e "${YELLOW}Need help? -> run 'sudo sysctl net.ipv4.ip_unprivileged_port_start=80' for this session or run 'sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80' for a permanent configuration${ENDCOLOR}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}net.ipv4.ip_unprivileged_port_start is ${NET_IPV4_UNPRIV_PORT_START}${ENDCOLOR}"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
echo -e "${YELLOW}Checking jq installation${ENDCOLOR}"
|
echo -e "${YELLOW}Checking jq installation${ENDCOLOR}"
|
||||||
JQ_PATH=$(which jq 2>/dev/null || echo 'FALSE')
|
JQ_PATH=$(which jq 2>/dev/null || echo 'FALSE')
|
||||||
if [ "$JQ_PATH" == "FALSE" ];
|
if [ "$JQ_PATH" == "FALSE" ];
|
||||||
|
|
Loading…
Reference in a new issue