#!/bin/bash

. /opt/alt/python27/usr/share/python-cllib/scripts/cl-common
target="cagefs"
common_path="/usr/share/cagefs/cpanel"

if [ -z "$1" ]; then
    createHookHeader "/scripts/prekillacct" "$target" "$common_path"
    checkHookString "/scripts/prekillacct" "/usr/share/cagefs-plugins/hooks/terminate_cagefs_account.sh \"\$@\"" " #CageFS"
else
    if [ -e "/scripts/prekillacct" ]; then
        deleteAllInclude "/scripts/prekillacct" "prekillacct" "/#CageFS/d" "$common_path"
    fi
fi
