Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /root/ drwxr-xr-x |
Viewing file: Select action/file-type: #!/bin/bash dir=$1 dir_etc=$dir"/etc" dir_usr=$dir"/usr" dir_var=$dir"/var" dir_etc=`echo $dir_etc | sed "s/\/\//\//g"` dir_usr=`echo $dir_usr | sed "s/\/\//\//g"` dir_var=`echo $dir_var | sed "s/\/\//\//g"` if [ "x$dir" = "x" ]; then echo "Usage: $0 [destination directory]" echo " For example: $0 /mnt/" exit -1 fi if [ ! -d $dir_etc ]; then echo "Direcory $dir_etc is missing, please check $dir" exit -1 fi if [ ! -d $dir_usr ]; then echo "Direcory $dir_usr is missing, please check $dir" exit -1 fi if [ ! -d $dir_var ]; then echo "Direcory $dir_var is missing, please check $dir" exit -1 fi echo "Starting rsync" ### rsync process ### rsync -av /etc/postfix/ $dir_etc/postfix/ rsync -av /etc/dovecot/dovecot.passwd $dir_etc/dovecot/ rsync -av /etc/bind/ $dir_etc/bind/ rsync -av /etc/squirrelmail/config.php $dir_etc/squirrelmail/config.php rsync -av /etc/apache2/apache2.conf $dir_etc/apache2/apache2.conf rsync -av /etc/apache2/mods-available/rpaf.conf $dir_etc/apache2/mods-available/rpaf.conf rsync -av /etc/apache2/mods-enabled/rpaf.conf $dir_etc/apache2/mods-enabled/rpaf.conf rsync -av /etc/nginx/nginx.conf $dir_etc/nginx/nginx.conf rsync -av /etc/network/interfaces $dir_etc/network/interfaces rsync -av /etc/php5/cgi/php.ini $dir_etc/php52/cgi/php.ini rsync -av /etc/xinetd.d/mysql $dir_etc/xinetd.d/mysql rsync -av /etc/mysql/conf.d/mysql-proxy $dir_etc/mysql/conf.d/mysql-proxy rsync -av /usr/local/ispmgr/etc/ispmgr.conf $dir_usr/local/ispmgr/etc/ispmgr.conf rsync -av /usr/local/ispmgr/etc/rotate.conf $dir_usr/local/ispmgr/etc/rotate.conf rsync -av /usr/local/ispmgr/etc/ispmgr.lic $dir_usr/local/ispmgr/etc/ispmgr.lic rsync -av /usr/local/ispmgr/etc/*email $dir_usr/local/ispmgr/etc/ rsync -av --delete /usr/local/ispmgr/var/userconf/ $dir_usr/local/ispmgr/var/userconf/ rsync -av --delete /usr/local/ispmgr/var/usernote/ $dir_usr/local/ispmgr/var/usernote/ rsync -av /usr/local/ispmgr/var/httpd-acct.log $dir_usr/local/ispmgr/var/httpd-acct.log rsync -av /usr/local/ispmgr/var/ispmgr.lang.stat $dir_usr/local/ispmgr/var/ rsync -av /usr/local/ispmgr/addon/rbackup.conf.php $dir_usr/local/ispmgr/addon/ rsync -av /usr/local/ispmgr/etc/ispmgr.inc $dir_usr/local/ispmgr/etc/ispmgr.inc rm -r $dir_var/spool/postfix rsync -av /var/spool/postfix $dir_var/spool/ cd /etc/ rsync -av aliases* group* passwd* shadow* hostname hosts $dir_etc/ hostname -f > $dir_etc/mailname rsync -a /etc/mail/ $dir_etc/mail/ rsync -a /var/spool/cron/crontabs/ $dir_var/spool/cron/crontabs --exclude="*root*" rsync -a /var/spool/squirrelmail/ $dir_var/spool/squirrelmail/ rsync -a /var/lib/squirrelmail/ $dir_var/lib/squirrelmail/ rsync -a /var/ftp $dir_var/ echo "Fixing home directories..." cd $dir_usr/local/ispmgr/etc/home.skel/ for i in `cat /etc/passwd | grep "/data:" | awk -F':' '{print $1}'`; do if [ -d /home/$i/data ]; then rm -r /home/$i/data/php52-bin cp -ax /home/$i/data/php-bin /home/$i/data/php-bin.bak mv /home/$i/data/php-bin /home/$i/data/php52-bin rsync -a php-bin php53-bin /home/$i/data/ cp -ax /home/$i/data/php52-bin/php.ini /home/$i/data/php-bin/ cp -ax /home/$i/data/php52-bin/php.ini /home/$i/data/php53-bin/ rsync -a php52-bin/php /home/$i/data/php52-bin/ chown $i:$i /home/$i/data/php52-bin /home/$i/data/php-bin /home/$i/data/php53-bin /home/$i/data/php52-bin/* /home/$i/data/php-bin/* /home/$i/data/php53-bin/* fi done echo "Preparing php52..." for w in `cat /etc/apache2/apache2.conf | grep "<Directory " | awk '{print $2}' | awk -F'>' '{print $1}' | grep www | sort | uniq `; do d=`echo $w | awk -F'/www/' '{print $1}'` echo > $dir_usr/local/ispmgr/etc/wwwphpversion.inc if [ -d $d"/php52-bin" ]; then echo "<Directory $w> #level=5 #php=php52 FCGIWrapper $d/php52-bin/php .php FCGIWrapper $d/php52-bin/php .php3 FCGIWrapper $d/php52-bin/php .php4 FCGIWrapper $d/php52-bin/php .php5 FCGIWrapper $d/php52-bin/php .phtml Options +ExecCGI </Directory>" > $dir_usr/local/ispmgr/etc/wwwphpversion.inc fi done chgrp postdrop $dir_usr/sbin/postdrop $dir_usr/sbin/postqueue chmod g+s $dir_usr/sbin/postdrop $dir_usr/sbin/postqueue echo "Starting quota stuff" quotaoff -a mv /home/aquota.group /home/aquota.group.upgrade mv /home/aquota.user /home/aquota.user.upgrade echo "" echo "==========================" echo "WARNING: please run next commands after reboot to new system:" echo "######## quotaoff -a cp -ax /home/aquota.group.upgrade /home/aquota.group cp -ax /home/aquota.user.upgrade /home/aquota.user quotacheck -vmug /home quotaon /home killall ispmgr ########" echo "==========================" echo "" echo "All done exiting..." |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.024 ]-- |