-
Notifications
You must be signed in to change notification settings - Fork 0
/
remove
39 lines (27 loc) · 738 Bytes
/
remove
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
basdir=$(pwd)/
datadir=$basdir"data/"
source "$basdir"include/isroot.sh
source "$basdir"include/export.sh
get_argument_value() {
argument_name="$1"
shift
while [ "$1" ]; do
if [[ "$1" == "$argument_name" ]]; then
echo "$2"
return
fi
shift 2
done
}
if [[ $# -eq 0 ]]; then
source "$basdir""remove-include/help.sh"
exit 1
fi
arg1=$(get_argument_value "--domain" "$@") # --domain myhost.com
arg2=$(get_argument_value "--conf" "$@") #to/dir/sites/
source "$basdir""remove-include/arguments.sh"
source "$basdir"remove-include/cert_existes.sh
source "$basdir"remove-include/check_httpdConf.sh
rm -r $domain_name
echo "$arg1 certificate! removed , includes subdomains certificates "