This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define _buildid .26 | |
%bcond_with systemd | |
%global _hardened_build 1 | |
%global nginx_user nginx | |
%global nginx_group %{nginx_user} | |
%global nginx_home %{_localstatedir}/lib/nginx | |
%global nginx_home_tmp %{nginx_home}/tmp | |
%global nginx_confdir %{_sysconfdir}/nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($argv[1]) || !is_file($argv[1])) { | |
die("Please specify an input file, preferably one that exists. e.g. php split.php vhosts.conf exportdir(optional) "); | |
} | |
if (isset($argv[2]) && is_dir($argv[2])) { | |
$dir = realpath($argv[2]).DIRECTORY_SEPARATOR; | |
} else { | |
echo "No Export dir specified, or non existent one, using default".PHP_EOL; | |
$dir = getcwd().DIRECTORY_SEPARATOR."vhosts".DIRECTORY_SEPARATOR; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: openresty | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts openresty | |
# Description: starts openresty using start-stop-daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d "ngxvhosts" ]; then | |
mkdir ngxvhosts | |
fi | |
if [ -f "xx*" ]; then | |
rm xx* | |
fi | |
echo $1 $2 $3 | |
csplit nginx.conf '/\s*\<server\>\s*/' {*} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description of index | |
* @copyright Copyright (c) 2016 FRK Agency. All rights reserved | |
* @author Tiago Peralta <[email protected]> | |
*/ | |
if (!isset($argv[1]) || !is_file($argv[1])) { | |
die("Please specify an input file, preferably one that exists. e.g. php split.php vhosts.conf exportdir(optional) "); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* CIDR.php | |
* | |
* Utility Functions for IPv4 ip addresses. | |
* Supports PHP 5.3+ (32 & 64 bit) | |
* @author Jonavon Wilcox <[email protected]> | |
* @revision Carlos Guimarães <[email protected]> | |
* @version Wed Mar 12 13:00:00 EDT 2014 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* class CIDR. | |
* Holds static functions for ip address manipulation. | |
*/ | |
class CIDR { | |
/** | |
* method CIDRtoMask | |
* Return a netmask string if given an integer between 0 and 32. I am |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MSCONN=$(echo "SHOW GLOBAL STATUS LIKE 'Uptime';" | mysql -pyoursupersecurepasswordthatnotevengodknows) | |
CONSTAT=$? | |
SSTAT=$(service mysqld status) | |
LRET=$? | |
if [ $CONSTAT -ne 0 ] || [ $LRET -ne 0 ]; then | |
subject="Mysql Server Down / Unresponsive"; | |
recipients="[email protected],thisoneisnot@nopecom" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WBSRV=$(/usr/bin/timeout 10 /usr/bin/curl --verbose --header 'Host: pornhub.com' 'http://localhost/' -m 10 -f --silent > /dev/null 2>&1) | |
WBSRVSTAT=$? | |
SSTAT=$(/sbin/service httpd status) | |
LRET=$? | |
if [ $WBSRVSTAT -ne 0 ] || [ $LRET -ne 0 ]; then | |
subject="Apache Server Down / Unresponsive"; | |
recipients="[email protected],[email protected]" | |
message="Apache Service is down or not responding, restarting service, if it fails to restart or if you receive this message again in 1 minute, please check with your awesome sysadmins! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATABASES_TO_EXCLUDE="db1 db2 db3" | |
EXCLUSION_LIST="'information_schema','mysql','performance_schema'" | |
for DB in `echo "${DATABASES_TO_EXCLUDE}"` | |
do | |
EXCLUSION_LIST="${EXCLUSION_LIST},'${DB}'" | |
done | |
SQLSTMT="SELECT schema_name FROM information_schema.schemata" | |
SQLSTMT="${SQLSTMT} WHERE schema_name NOT IN (${EXCLUSION_LIST})" | |
MYSQLDUMP_DATABASES="--databases" |
OlderNewer