I need some help with a bit of shell script.
The code below works, and if sed is found then it continues with the script but if it doesn't exist it will exit.
if ! [ -x "$(command -v sed)" ]; then
echo "Error: sed is not installed, please install sed." >&2
exit
fi
What would I have to change to make it if the system finds ufw than it will run those commands.
if ! [ -x "$(command -v ufw)" ]; then
ufw allow 80/tcp
ufw allow 443/tcp
fi