#!/bin/bash

. /opt/alt/python27/usr/share/python-cllib/scripts/cl-common

before_apache_make="/scripts/before_apache_make"
posteasyapache="/scripts/posteasyapache"
postupcp="/scripts/postupcp"
postwwwacct="/scripts/postwwwacct"
postmodifyacct="/scripts/postmodifyacct"
postrestoreacct="/scripts/postrestoreacct"

target="CageFS"
log_message="Delete hooks"
common_path="/usr/share/cagefs/cpanel"

showBar 1
deleteAllInclude "$before_apache_make" "before_apache_make" "/#$target/d" "$common_path"
showBar 2
writeToLog "before_apache_make: $log_message" "$common_path"

showBar 3
deleteAllInclude "$posteasyapache" "posteasyapache" "/#$target/d" "$common_path"
showBar 4
writeToLog "posteasyapache: $log_message" "$common_path"

showBar 5
deleteAllInclude "$postupcp" "postupcp" "/#$target/d" "$common_path"
showBar 6
writeToLog "postupcp: $log_message" "$common_path"

showBar 7
deleteAllInclude "$postwwwacct" "postwwwacct" "/#$target/d" "$common_path"
showBar 8
writeToLog "postwwwacct: $log_message" "$common_path"

showBar 9
deleteAllInclude "$postmodifyacct" "postmodifyacct" "/#$target/d" "$common_path"
showBar 10
writeToLog "postmodifyacct: $log_message" "$common_path"

showBar 11
deleteAllInclude "$postrestoreacct" "postrestoreacct" "/#$target/d" "$common_path"
showBar 12
writeToLog "postrestoreacct: $log_message" "$common_path"

echo
