| 12345678910111213141516171819202122232425262728293031323334 |
- #!/bin/bash
- #
- # !!! WRAPPER SCRIPT FOR COMPATIBILITY PURPOSES WITH OLD IPV4 SCRIPTS AND EXTERNAL CALLS !!!
- #
- # info: add web domain
- # options: USER DOMAIN [IPV4] [RESTART] [ALIASES] [PROXY_EXTENSIONS]
- #
- # example: v-add-web-domain admin wonderland.com 192.18.22.43 yes www.wonderland.com
- #
- # This function adds virtual host to a server. In cases when ip is
- # undefined in the script, "default" template will be used. The alias of
- # www.domain.tld type will be automatically assigned to the domain unless
- # "none" is transmited as argument. If ip have associated dns name, this
- # domain will also get the alias domain-tpl.$ipname. An alias with the ip
- # name is useful during the site testing while dns isn't moved to server yet.
- #----------------------------------------------------------#
- # Variables & Functions #
- #----------------------------------------------------------#
- # Argument definition
- user="$1"
- domain="$2"
- ip="$3"
- ipv6="" # EMPTY! Not used here, because of old IPV4 only mode
- restart="$4" # will be moved to the end soon
- aliases="$5"
- proxy_ext="$6"
- # Includes
- # shellcheck source=/etc/hestiacp/hestia.conf
- source /etc/hestiacp/hestia.conf
- ${HESTIA}/bin/v-add-web-domain-ipv46 "$user" "$domain" "$ip" "$ipv6" "$restart" "$aliases" "$proxy_ext"
|