Category Other

Jenkins Cleanup Old Builds

I wrote a quick shell script to cleanup old Jenkins builds. This will delete any build older than 30 days. #!/bin/bash # jenkins_delete_old_builds.sh # Author: Steve Stonebraker # Date: 8/5/2019 # Description: Deletes any build older than 30 days #…

Testing SSL Chaining Issues

Recently I needed to debug an issue by testing SSL chaining issues My old standby tools (curl and openssl were not reporting any errors) The exception javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of…

Neo4j Couldn’t get file lock

Problem A non-root user is running Neo4j and you are seeing locking errors in the log file Symptom May 8, 2013 6:20:31 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode WARNING: Could not lock User prefs. Unix error code 2. May 8, 2013 6:20:31 PM…

phone laws driving headphones

By State: phone laws driving headphones Ever wondered if it is legal to wear headphones while driving in a particular state? Wonder no more! Alabama No prohibition on wearing of headsets while driving. Alaska Wearing an audio headset or earplugs…

sed delete all lines after

Objective: Prep dev httpd.conf for production Tasks: Remove jenkins virtual host entry (which starts with a comment line “#Start Jenkins”) Replace .dev with nothing (ex: www.dev.example.com becomes www.example.com) Replace debug with error (ex: Loglevel debug becomes Loglevel error) Sed to…

rollback httpd.conf changes on error

To rollback httpd.conf changes on error use this script: #!/bin/bash #File: deploy_new_httpd_conf.sh #Define this PATH_TO_NEW_HTTPD_CONF=”~” #Backup old httpd.conf file /bin/cp -f #Copy new httpd.conf over the existing one /bin/cp -f ${PATH_TO_NEW_HTTPD_CONF} #Test the Syntax /usr/sbin/apachectl -t if…

Websphere Stop All Servers Script

Here’s a ksh script to stop all running websphere servers. Booyah! #!/bin/ksh # # This script stops all running Websphere servers # cd /opt/ibm/WAS70/logs servers=`echo *Node*` cd /opt/ibm/WAS70/AppServer/profiles/AppSrv01/bin for server in $servers; do pid=`ps -ef | grep $server | grep…