Sunday, December 4, 2022
Bash Script

Membuat script running background per detik

buat script nya nano /home/kill.sh

#!/bin/bash
for i in `ps -ef |grep danielha|awk ‘{print $2}’`;do kill -9 $i;done

bikin script per detik nya :

nano perdetik.sh

#!/bin/bash
while true
do
/home/kill.sh
sleep 1
done

Running background :

/bin/sh perdetik.sh > /dev/null 2>&1 &

kemudian taro di rc.local supaya kalo di reboot aktif lagi script nya

nano /etc/rc.local

/home/kill1.sh > /dev/null 2>&1 &

(Visited 6 times, 1 visits today)
Baca Juga :  Membuat Email alert untuk spamming di postfix

Similar Posts


Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270