Categories
Uncategorized

Letsencrypt renew cron for Nginx CentOS / Ubuntu

crontab -e
@monthly letsencrypt-auto certonly --email [email protected] --agree-tos --webroot --renew-by-default -w /home/the-d2/public_html/ -d the-d2.com -d www.the-d2.com --authenticator webroot ; nginx -t && /etc/init.d/nginx reload

Categories
Uncategorized

How to delete Magento session_ files older than 30 days with cron

Manual command (in screen)
find /home/the-d2.com/public_html/var/session/ -type f -name "sess*" -mtime +30 -exec rm -f {} \; >/dev/null 2>&1
Cron
0 0 * * * find /home/the-d2.com/public_html/var/session/ -type f -name "sess*" -mtime +30 -exec rm -f {} \; >/dev/null 2>&1