feat: ask for installation method
This commit is contained in:
parent
f753a7bae7
commit
6ec7228db4
1 changed files with 17 additions and 1 deletions
16
run.sh
16
run.sh
|
@ -8,7 +8,23 @@ then
|
||||||
# check if stdin (fd 0) is assigned to a tty
|
# check if stdin (fd 0) is assigned to a tty
|
||||||
[ ! -t 0 ] && echo "Not a TTY! Exiting" && exit 1
|
[ ! -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
|
/venv/bin/certbot certonly --nginx
|
||||||
|
else
|
||||||
|
/venv/bin/certbot --nginx
|
||||||
|
fi
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue