?¡ëPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À?¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
usr/bin/acinfo 0000666 00000010322 15050033413 0007303 0 ustar 00 #!/bin/bash
#bash script for getting shared hosting account info (ISP Manager 4/5/6)
#by Aliaksandr Filimonov, Timofei Mikhailovskiy
#ActiveCloud, 2022
# Uncomment if debug needed
#set -x
function help()
{
echo -e "\033[32;1mScript usage:\033[0m\n./info.sh USERNAME"
exit 0 # normal exit
}
if [[ $# -eq 0 ]] || [ "$1" == '-h' ] || [ "$1" == '--help' ];
then
help
fi
# Get ISP Manager version
[[ -f /usr/local/ispmgr/bin/ispmgr ]] && ispver=$(/usr/local/ispmgr/bin/ispmgr -V | cut -d. -f1)
[[ -f /usr/local/mgr5/bin/core ]] && ispver=$(/usr/local/mgr5/bin/core -V | cut -d. -f1)
if ([ "$ispver" -ne '4' ] && [ "$ispver" -ne '5' ] && [ "$ispver" -ne '6' ]);
then
echo "ISP Manager not found!"
exit 1 # exit with error
fi
USER=$1
function isp4()
{
cmdpath="/usr/local/ispmgr/sbin/mgrctl"
disk=$($cmdpath -m ispmgr user | grep $USER | awk '{print $3}' | cut -d '=' -f2)
echo -e "\033[31;1mServer:\033[0m $(hostname)"
echo -e "\033[31;1mUser:\033[0m $USER"
homedir=$(eval echo ~$USER)
diskuser=$(du -ch --max-depth=0 $homedir | tail -n1 | awk '{print $1}')
echo -e "\033[31;1mHome directory:\033[0m $homedir"
echo -e "\033[31;1mDisk space used - ISP QUOTA (without DBs), MB:\n\033[0m$disk"
echo -e "\033[31;1mDisk space used - SYSTEM (without DBs):\n\033[0m$diskuser"
echo -e "\n\033[31;1mDomains:\033[0m"
$cmdpath -m ispmgr wwwdomain su=$USER | awk '{print $1 " " $3 " " $2}' | sed 's/=/: /g'
echo -e "\033[32;1mTotal: $($cmdpath -m ispmgr wwwdomain su=$USER | awk '{print $1 " " $3 " " $2}' | sed 's/=/: /g' | wc -l)\033[0m\n"
echo -e "\033[31;1mPHP version:\033[0m"
$cmdpath -m ispmgr changer su=$USER | sed 's/=/: /g'
echo -e "\n\033[31;1mDataBases:\033[0m"
$cmdpath -m ispmgr db su=$USER | awk '{print $3 " " $4}' | sed 's/=/: /g'
echo -e "\033[32;1mTotal: $($cmdpath -m ispmgr db su=$USER | awk '{print $3 " " $4}' | sed 's/=/: /g' | wc -l)\033[0m\n"
echo -e "\033[31;1mRedirects:\033[0m"
if [[ -z `$cmdpath -m ispmgr wwwredirect su=$USER` ]]
then echo "No redirects"
fi
echo -e "\n\033[31;1mCronJobs:\033[0m"
if [[ -z `$cmdpath -m ispmgr cron su=$USER` ]]
then echo -e "No cron jobs"
else echo -e "\033[32;1mCron job detected\033[0m"
fi
}
function isp56()
{
cmdpath='/usr/local/mgr5/sbin/mgrctl'
echo -e "\033[31;1mServer:\033[0m $(hostname)"
disk=$($cmdpath -m ispmgr user | grep $USER | awk '{print $8}' | cut -d '=' -f2)
disklimit=$($cmdpath -m ispmgr user | grep $USER | awk '{print $7}' | cut -d '=' -f2)
echo -e "\033[31;1mUser:\033[0m $USER"
homedir=$(eval echo ~$USER)
diskuser=$(du -ch --max-depth=0 $homedir | tail -n1 | awk '{print $1}')
echo -e "\033[31;1mHome directory:\033[0m $homedir"
echo -e "\033[31;1mDisk space used - ISP QUOTA (without DBs), MB:\n\033[0m$disk/$disklimit"
echo -e "\033[31;1mDisk space used - SYSTEM (without DBs):\n\033[0m$diskuser"
echo -e "\n\033[31;1mDomains:\033[0m"
sqlite3 /usr/local/mgr5/etc/ispmgr.db 'select t1.value, t2.name, docroot, php_mode, php_cgi_version from webdomain_ipaddr t1 inner join webdomain t2 ON t1.webdomain = t2.id;' | grep $USER | awk -F'|' '{print "Domain: "$2, "Docroot: "$3, "IP: "$1, "PHP_mode: "$4, "PHP_version: "$5}' | column -t
echo -e "\033[32;1mTotal: $(sqlite3 /usr/local/mgr5/etc/ispmgr.db 'select t1.value, t2.name, docroot, php_mode, php_cgi_version from webdomain_ipaddr t1 inner join webdomain t2 ON t1.webdomain = t2.id;' | grep $USER | awk -F'|' '{print "Domain: "$2, "Docroot: "$3, "IP: "$1, "PHP_mode: "$4, "PHP_version: "$5}' | wc -l)\033[0m"
echo -e "\n\033[31;1mDatabases (size in MB):\033[0m"
$cmdpath -m ispmgr db su=$USER | grep -oE 'name=[0-9A-Za-z._]*\b|size=[0-9.]*\b' | sed 's/=/: /g' | column -t
echo -e "\033[32;1mTotal: $($cmdpath -m ispmgr db su=$USER | wc -l)\033[0m"
echo -e "\n\033[31;1mCronJobs:\033[0m"
crontab -l -u $USER >/dev/null 2>&1 && echo -e "\033[32;1mCron job detected\033[0m" || echo "No cron jobs"
}
function userinfo()
{
case $ispver in
"4")
isp4
;;
"5" | "6")
isp56
;;
esac
}
grep -q $USER /etc/passwd && userinfo || echo -e "\033[31;1mERROR: No such user!\033[0m"; exit 0