while running a dockerfile, it was hanged at the following Configuring tzdata ------------------ Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located. 1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc 2. … Continue reading Dockerfile build hanged at Configuring tzdata
Category: scripts
script to test website response time
We can simply test the website response time using the following script from the linux command line. curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nAppCon Time:\t\t%{time_appconnect}\nRedirect Time:\t\t%{time_redirect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://www.domain.com
install package “wkhtmltopdf” to convert html to pdf
1. Install the wkhtmltopdf package # wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm 2. check version # wkhtmltopdf -V 3. Now link the binary file' # ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf 3. To test whether the html is converted to pdf # /usr/local/bin/wkhtmltopdf http://www.google.com google.pdf Loading pages (1/6) Counting pages (2/6) Resolving links (4/6) Loading headers and footers (5/6) Printing pages … Continue reading install package “wkhtmltopdf” to convert html to pdf
Script to check and take crashed database list in a file
mysqlcheck --all-databases | grep "doesn't exist" | awk {'print $4'} | cut -d. -f1 | cut -d \' -f2 | uniq > /root/dblist
To check who has deleted the email account in a cPanel server
This can be easily understood from the cPanel access logs. grep domain.com /usr/local/cpanel/logs/access_log | grep delpop
Nagios virtfs warning
When you see the following error in the nagios, do the step below. DISK CRITICAL - /home/virtfs/bunny/lib is not accessible: Permission denied Fix Login to the vps main node and issue the following command. for i in `cat /proc/mounts | grep virtfs | awk {'print $2'}`; do echo "Umounting $i"; umount $i; done Also use … Continue reading Nagios virtfs warning
MySQL password length checker
script to check MySQL password length of users. mysql -e "SELECT user, Length(Password) FROM mysql.user;" | grep -E "16" | head
To create 10 MB image file in linux
To create a 10 MB file in Linux you can use following command. dd if=/dev/zero of=test.img bs=1024 count=0 seek=$[1024*10]
To change permission of files and folders under public_html
To change permission of folders and files under the public_html of a domain at once we can use the following script. find ./ -type d -exec chmod 755 {} \; find ./ -type f -exec chmod 644 {} \;