Skip to content

Instantly share code, notes, and snippets.

View simplyadrian's full-sized avatar
:shipit:
brooding

Adrian Herrera simplyadrian

:shipit:
brooding
  • Minneapolis, MN
  • 01:05 (UTC -05:00)
View GitHub Profile
@simplyadrian
simplyadrian / download_application_code.ps1
Created May 14, 2015 14:20
Download application code using SVN or zip file from a designated storage location.
# Powershell 2.0
# Stop and fail script when a command fails.
$errorActionPreference = "Stop"
# load library functions
$rsLibDstDirPath = "$env:rs_sandbox_home\RightScript\lib"
. "$rsLibDstDirPath\tools\PsOutput.ps1"
. "$rsLibDstDirPath\ros\Ros.ps1"
. "$rsLibDstDirPath\tools\Archive.ps1"
@simplyadrian
simplyadrian / dep_web_application_code_deployment.ps1
Created May 14, 2015 14:16
Download a zip file and deploy a web application via powershell
# Powershell 2.0
# Stop and fail script when a command fails.
$errorActionPreference = "Stop"
# load library functions
$rsLibDstDirPath = "$env:rs_sandbox_home\RightScript\lib"
. "$rsLibDstDirPath\tools\PsOutput.ps1"
. "$rsLibDstDirPath\ros\Ros.ps1"
. "$rsLibDstDirPath\tools\Archive.ps1"
@simplyadrian
simplyadrian / php_install.sh
Created May 12, 2015 06:41
a bash script to install php
#!/bin/bash -ex
#
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "Php Modules Install, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / phing_install.sh
Created May 12, 2015 06:40
a bash script to install phing for PHP
#!/bin/bash -ex
#
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "Phing Install, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / ossec_server_restore.sh
Created May 12, 2015 06:39
a bash script to restore a OSSEC server
#!/bin/bash -e
# Package requirements: ossec-hids ossec-hids-server
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "ossec server restore, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / ossec_client_installer.sh
Created May 12, 2015 06:39
a bash script to configure the OSSEC client
#!/bin/bash
#
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "ossec client Install, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / modify_php_config.sh
Created May 12, 2015 06:37
a bash script to configure PHP's ini file
#!/bin/bash -e
#
#
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true"; then
logger -t RightScale "SYS Enable short_tags php.ini, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / modify_apc_config.sh
Created May 12, 2015 06:36
a bash script to install configure APC for PHP
#!/bin/bash -e
#
#
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true"; then
logger -t RightScale "SYS Modify apc.ini, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / maven_3_install.sh
Created May 12, 2015 06:35
a bash script to install Maven3
#!/bin/bash -e
# Package requirements: maven 3
#Archiva home directory: Recommended directory is "/usr/local"
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "Maven Install, skipped on a reboot."
exit 0
fi
@simplyadrian
simplyadrian / install_jenkins.sh
Created May 12, 2015 06:34
a bash script to install Jenkins
#!/bin/bash -e
# Package requirements: jenkins
# Test for a reboot, if this is a reboot just skip this script.
#
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then
logger -t RightScale "Jenkins Install, skipped on a reboot."
exit 0
fi