I have create a simple bash script to renew my certbot certificates when i run the script it ask me to press 2 to continue
i want to add this answer in my bash script can someone help me to add 2 and aontinue automatically here is below my script.
#!/bin/bash
certbot certonly --rsa-key-size 4096 --standalone --agree-tos --no-eff-email --email malik.chand@hotmail.com -d mydomain.com
echo "Your VPN Certificate Is Genrated This Certificate Will be Expire After 90 Day Date date "+%Y-%m-%d %H:%M:%S"
" | mail -s "IKEv2 Certificate" malik.chand@hotmail.com
yes | rm /etc/strongswan/swanctl/x509/fullchain.pem
yes | rm /etc/strongswan/swanctl/private/privkey.pem
yes | rm /etc/strongswan/ipsec.d/cacerts/chain.pem
cp /etc/letsencrypt/live/mydomain.com/fullchain.pem /etc/strongswan/swanctl/x509/fullchain.pem
cp /etc/letsencrypt/live/mydomain.com/privkey.pem /etc/strongswan/swanctl/private/privkey.pem
cp /etc/letsencrypt/live/mydomain.com/chain.pem /etc/strongswan/ipsec.d/cacerts/
exit