PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/thread-self/root/proc/self/root/proc/self/root/opt/sharedrads/extras/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/thread-self/root/proc/self/root/proc/self/root/opt/sharedrads/extras/replaceindex

#!/bin/bash
# Used to replace IMH holder index pages
# Vanessa V. 7/13/10 RADS

REPO=http://repo.imhadmin.net/open/imh/
BKDIR=/root/replaced
SKEL=/root/cpanel3-skel/public_html
LOG=$BKDIR/log
DATE=$(date +%D_%T)

if [ ! -d $BKDIR ]; then
	mkdir $BKDIR
fi
	touch $LOG

# Replace skel files

cd /root ; wget -q $REPO/default.htm

if [ ! -s /root/default.htm ]; then
	echo "Error downloading index file...quitting"
	exit 1
else
	rm -f $SKEL/index.htm
	rm -f $SKEL/index.html
	rm -f $SKEL/default.htm

	mv -f /root/default.htm $SKEL
fi

STRING="If you own this site, your new web hosting account is now activated"
STRING2="If you are visiting this site, please check back soon"

# Loop through and find index pages

for user in `/bin/ls -A /var/cpanel/users` ; do

	USERPATH=/home/$user/public_html
	array=($USERPATH/index.htm $USERPATH/index.html $USERPATH/default.htm)

	for index in ${array[*]}
	do
		if [ -f $index ]; then

			if grep "$STRING" $index >/dev/null && grep "$STRING2" $index >/dev/null ; then

			PAGEPATH=$(ls $index | cut -d/ -f1,2,3,4)
			PAGENAME=$(ls $index | cut -d/ -f5)

			# Replace index pages

			mv -f $index $BKDIR/$user-$PAGENAME
			cp -f $SKEL/default.htm $index
			chown $user:$user $index
                        MSG="Replaced $PAGENAME in $PAGEPATH"
			echo "$DATE : $MSG" >> $LOG
			echo $MSG

			fi

		fi

	done
done