fix acme-challenge subfolder creation
This commit is contained in:
parent
78d0293b44
commit
4eaf3ad6d1
|
@ -935,17 +935,17 @@ op_updatesslvhost() {
|
||||||
|
|
||||||
op_managehttpchallengefile() {
|
op_managehttpchallengefile() {
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
folder="/var/lib/letsencrypt/.well-known/acme-challenge"
|
folder="/var/lib/letsencrypt/.well-known"
|
||||||
file="testfile"
|
file="testfile"
|
||||||
|
|
||||||
action=${1};
|
action=${1};
|
||||||
|
|
||||||
if [ "$action" = "create" ]; then
|
if [ "$action" = "create" ]; then
|
||||||
if [ ! -d "$folder" ]; then
|
if [ ! -d "$folder" ]; then
|
||||||
mkdir -p "$folder"
|
mkdir -p "$folder/acme-challenge"
|
||||||
fi
|
fi
|
||||||
if [ ! -f "$folder/$file" ]; then
|
if [ ! -f "$folder/acme-challenge/$file" ]; then
|
||||||
touch "$folder/$file"
|
touch "$folder/acme-challenge/$file"
|
||||||
fi
|
fi
|
||||||
chmod -R 755 "$folder"
|
chmod -R 755 "$folder"
|
||||||
elif [ "$action" = "delete" ]; then
|
elif [ "$action" = "delete" ]; then
|
||||||
|
|
Loading…
Reference in a new issue