Browse Source

add manage-http-challenge-file function

pull/63/head
Nicolas Roman 1 year ago
parent
commit
b25639c3aa
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      scripts/web-add.sh

+ 24
- 0
scripts/web-add.sh View File

@ -156,6 +156,11 @@ setphpversion LOGIN VERSION
setquota LOGIN QUOTA_SOFT:QUOTA_HARD
Change quotas for LOGIN
manage-http-challenge-file [CREATE | DELETE]
Create or delete a dummy file for the Let's Encrypt HTTP challenge
The default directory is /var/lib/letsencrypt/.well-known/
EOT
}
@ -845,6 +850,9 @@ arg_processing() {
setquota)
op_setquota "$@"
;;
manage-http-challenge-file)
op_managehttpchallengefile "$@"
;;
*)
usage
;;
@ -852,6 +860,22 @@ arg_processing() {
fi
}
op_managehttpchallengefile() {
if [ $# -eq 1 ]; then
file="/var/lib/letsencrypt/.well-known/123456789"
action=${1};
if [ "$action" = "create" ]; then
touch "$file"
chmod 755 "$file"
elif [ "$action" = "delete" ]; then
rm "$file"
else usage
fi
else usage
fi
}
op_listvhost() {
if [ $# -eq 1 ]; then
configlist="$VHOST_PATH/${1}.conf";


Loading…
Cancel
Save