Mini Shell
#!/usr/bin/bash
. /usr/share/lve/dbgovernor/scripts/cpanel-common-lve
postupcp="/scripts/postupcp"
#mysqluserupdate1="/usr/local/cpanel/hooks/mysql/adduser"
#mysqluserupdate2="/usr/local/cpanel/hooks/mysql/deluser"
mysqlusercreate="/scripts/postwwwacct"
mysqluserkill="/scripts/postkillacct"
deleteAllInclude "$postupcp" "postupcp" "/#dbgovernor/d"
#deleteAllInclude "$mysqluserupdate1" "mysqluserupdate1" "/#dbgovernor/d"
#deleteAllInclude "$mysqluserupdate2" "mysqluserupdate2" "/#dbgovernor/d"
deleteAllInclude "$mysqlusercreate" "mysqlusercreate" "/#dbgovernor/d"
deleteAllInclude "$mysqluserkill" "mysqluserkill" "/#dbgovernor/d"
####################################################
# Standardized hooks list #
####################################################
hook_manager="/usr/local/cpanel/bin/manage_hooks"
old_map_hook="/usr/share/lve/dbgovernor/utils/dbgovernor_map"
map_hook="/usr/share/lve/dbgovernor/scripts/map_hook"
mysql_hook="/usr/share/lve/dbgovernor/scripts/mysql_hook"
# Try to delete hooks from previous version of governor
"$hook_manager" del script "$old_map_hook" --category=Whostmgr --event=Accounts::Create --manual 2>&1 >/dev/null
"$hook_manager" del script "$old_map_hook" --category=Whostmgr --event=Accounts::Modify --manual 2>&1 >/dev/null
"$hook_manager" del script "$old_map_hook" --category=Whostmgr --event=Accounts::Remove --manual 2>&1 >/dev/null
"$hook_manager" del script "$map_hook" --category=Whostmgr --event=Accounts::Create --manual
"$hook_manager" del script "$map_hook" --category=Whostmgr --event=Accounts::Modify --manual
"$hook_manager" del script "$map_hook" --category=Whostmgr --event=Accounts::Remove --manual
"$hook_manager" del script "$mysql_hook" --category=Cpanel --event=UAPI::Mysql::create_user --manual
"$hook_manager" del script "$mysql_hook" --category=Cpanel --event=UAPI::Mysql::rename_user --manual
"$hook_manager" del script "$mysql_hook" --category=Cpanel --event=UAPI::Mysql::delete_user --manual
echo
Zerion Mini Shell 1.0