add manage-http-challenge-file function
This commit is contained in:
parent
320a229d4f
commit
b25639c3aa
|
@ -156,6 +156,11 @@ setphpversion LOGIN VERSION
|
||||||
setquota LOGIN QUOTA_SOFT:QUOTA_HARD
|
setquota LOGIN QUOTA_SOFT:QUOTA_HARD
|
||||||
|
|
||||||
Change quotas for LOGIN
|
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
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,6 +850,9 @@ arg_processing() {
|
||||||
setquota)
|
setquota)
|
||||||
op_setquota "$@"
|
op_setquota "$@"
|
||||||
;;
|
;;
|
||||||
|
manage-http-challenge-file)
|
||||||
|
op_managehttpchallengefile "$@"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
@ -852,6 +860,22 @@ arg_processing() {
|
||||||
fi
|
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() {
|
op_listvhost() {
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
configlist="$VHOST_PATH/${1}.conf";
|
configlist="$VHOST_PATH/${1}.conf";
|
||||||
|
|
Loading…
Reference in a new issue