feat: ask for installation method

This commit is contained in:
DarkCat09 2025-02-19 14:10:57 +04:00
parent f753a7bae7
commit 6ec7228db4
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

16
run.sh
View file

@ -8,7 +8,23 @@ then
# check if stdin (fd 0) is assigned to a tty
[ ! -t 0 ] && echo "Not a TTY! Exiting" && exit 1
echo "Choose installation method:"
echo " 1. get certs for hosts specified in nginx.conf"
echo " and automatically edit the config (default)"
echo " 2. get certs for hosts, do not edit the config"
echo " 3. just launch shell, i'll do it myself"
read n
if [ "$n" = 3 ]
then
/bin/ash -i
elif [ "$n" = 2 ]
then
/venv/bin/certbot certonly --nginx
else
/venv/bin/certbot --nginx
fi
exit $?
fi