Add to /etc/goaccess.conf
:
time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
Add to /etc/goaccess.conf
:
time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
KEEP=5
rm -rf `ls -td $PATH_TO_FILES/*/ | tail -n +$(($KEEP+1))`
# Backup
ssh root@$SSH_HOST "tar cpf - / --exclude=/sys --exclude=/proc --exclude=/dev" | pv | gzip | cat > backup.tar.gz
# Restore
cat backup.tar.gz | ssh root@$SSH_HOST "pv | tar zxvf - -C /"
iptables -N LOGGING
iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 4
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 20 -j LOGGING
iptables -A LOGGING -j DROP
cat $SERIALIZED_PHP_FILE | php -r 'echo json_encode(unserialize(file_get_contents("php://stdin")));'
git filter-branch -f --commit-filter 'git commit-tree -S "$@"' HEAD
Stop JIRA
Execute Database Queries:
UPDATE propertynumber SET propertyvalue = 47
WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'GreenHopper.Upgrade.Latest.Upgraded.Version');
UPDATE propertystring SET propertyvalue = '47'
WHERE id = (SELECT id FROM propertyentry WHERE property_key = 'com.pyxis.greenhopper.jira:build');
SELECT @max := MAX(ID)+ 1 FROM ABC;
PREPARE stmt FROM 'ALTER TABLE ABC AUTO_INCREMENT = ?';
EXECUTE stmt USING @max;
DEALLOCATE PREPARE stmt;
grep -E '(vmx|svm)' /proc/cpuinfo
postconf -e "smtpd_client_restrictions = check_client_access regexp:/etc/postfix/client_restrictions"
cat > /etc/postfix/client_restrictions << EOF
/^(dhcp|dialup|ppp|adsl|pool)[^.]*[0-9]/ 550 S25R6 check
EOF
postfix reload