>|v:c d Z ddlZddlmZ ddlmZ edk r e ej e Ze d Z
e
d d
Ze
dd
dd e
dddd e
dd Ze
dd
dd e
dddd e
dddd e
ddddd e
dd Ze
dd
dd e
dddd e Z e Zej d k r"e ej ej dS ej dk r/e ej ej ej ej ! dS ej dk r"e ej ej dS edS )"z
Domain POST modification hook.
This script must be called AFTER different domain-related
changes in control panel. See --help and docs for detailed
description of actions and parameters.
N)ModifyDomainHook)setup_logger_and_sentry__main__)descriptioncommand)destcreatezH[NOT FOR VENDORS PANELS INTEGRATION] Call when domain record is created.)helpz
--usernamez-uTzUser that owns domain.)requiredr
z--domainz-dsz"Domain name e.g.: `userdomain.com`modifyzhCall when domain record is updated (e.g all sites that have worked on old domain now work on a new one).z1Domain name before rename, e.g.: `userdomain.com`z--new-domainz-dtz0Domain name after rename, e.g.: `userdomain2.eu`z--include-subdomainsF
store_truezIf set, we will also process all domains that end with domain name (subdomains). E.g. when renaming olddomain.com -> newdomain.eu we will also rename sub.olddomain.com to sub.newdomain.eu)r defaultactionr
deletezG[NOT FOR INTEGRATED CONTROL PANELS] Call when domain record is deleted.)include_subdomains)__doc__argparseclcommon.public_hooks.libr clcommon.public_hooksr __name__ArgumentParserparseradd_subparsers
subparsers
add_parser
create_domainadd_argument
modify_domain
parse_argsargshookr post_create_domainusernamedomainpost_modify_domain
new_domainr post_delete_domainNotImplementedError /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/public_hooks/bin/post_modify_domain.py