Skip to content

Instantly share code, notes, and snippets.

View cPLevey's full-sized avatar

David Levey cPLevey

  • cPanel, Inc.
  • Houston, TX
View GitHub Profile
@cPLevey
cPLevey / ea5740.patch
Created December 7, 2016 00:34
Quick .patch for EA-5740
--- migrate_ea3_to_ea4 2016-11-09 04:14:57.701999985 -0600
+++ migrate_ea3_to_ea4.patched 2016-12-06 18:24:00.573980212 -0600
@@ -41,10 +41,17 @@
use Cpanel::FindBin ();
use Cpanel::SafeRun::Full ();
+use Cpanel::DNSONLY ();
+
use POSIX qw{:sys_wait_h};
@cPLevey
cPLevey / ami_repo_fetch.sh
Created December 13, 2016 16:21
Fetch AMI repodata
#!/bin/sh
for REPOFILE in {repomd.xml,comps.xml,updateinfo.xml.gz,primary.sqlite.bz2}; do
echo "Fetching $REPOFILE";
curl -s "http://packages.us-east-1.amazonaws.com/2016.09/main/20160901f6a8/x86_64/repodata/$REPOFILE?instance_id=i-037c593f14c853b59&region=us-east-1" > $REPOFILE
done
@cPLevey
cPLevey / clamav.cf
Created June 22, 2019 01:40
ClamAV SpamAssassin Plugin Files
loadplugin ClamAV clamav.pm
full CLAMAV eval:check_clamav()
describe CLAMAV Clam AntiVirus detected a virus
score CLAMAV 10
add_header all Virus _CLAMAVRESULT_
@cPLevey
cPLevey / mysql
Created July 11, 2019 09:33
MariaDB etc/init.d/mysql
#!/bin/sh
# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind
# MariaDB daemon start/stop script.
# Usually this is put in /etc/init.d (at least on machines SYSV R4 based
# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql.
# When this is done the mysql server will be started when the machine is
# started and shut down when the systems goes down.