gestion ps

This commit is contained in:
Valentin CZERYBA 2023-02-26 22:32:10 +01:00
parent f519194c13
commit 85f7573262

View File

@ -5,7 +5,7 @@ HOST=($(cat /etc/sentinel/virtualhost))
BLACKLIST=/etc/sentinel/blacklist BLACKLIST=/etc/sentinel/blacklist
currently_blacklist=$(ps -ef | grep blacklist | grep bash |grep ${USER} | wc -l) currently_blacklist=$(ps -ef | grep blacklist | grep bash |grep ${USER} | wc -l)
if [ ${currently_blacklist} -eq 0 ]; then if [ ${currently_blacklist} -eq 2 ]; then
chain_count=$(iptables -L BLACKLIST -n | wc -l) chain_count=$(iptables -L BLACKLIST -n | wc -l)
if [ ${chain_count} -eq 0 ]; then if [ ${chain_count} -eq 0 ]; then