Skip to content

Instantly share code, notes, and snippets.

View fapestniegd's full-sized avatar

James S White fapestniegd

View GitHub Profile
# we use these defaults when nothing is specified
profiles:
lab-servers:
service: vcenter
vcenter: sol.eftdomain.net
datacenter: Nashville
cluster: EFTLAB
host: esx07.lab.eftdomain.net
resourcepool: Infrastructure
lun:
binddn: uid=whitejs,ou=People,dc=websages,dc=com
bindpass: I<3H34th'sM@m@
cacheage: 300
confpath: /home/whitejs/.shelldap.rc
server: ldaps://freyr.websages.com:636
timeout: 10
digraph trees {
subgraph ldap {
"write_setup" -> "setup-ds-admin.inf" [label = "always"];
"write_hostentry" -> "hostentry.ldif" [label = "always"];
"setup-ds-admin.inf" -> "check_adminsrv" [label = "repaired"];
"setup-ds-admin.inf" -> "check_slapd" [label = "kept"];
"hostentry.ldif" -> "check_slapd" [label = "repaired"];
"check_adminsrv" -> "slapd_initialized" [label = "repaired"];
<html>
<body>
<form>
<select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value">
<option value="?prnt=skrs0001" selected >prnt0001
<option value="?prnt=skrs0002">prnt0002
<option value="?prnt=skrs0003">prnt0003
</select>
</form>
</body>
#!/usr/bin/python
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
first_name = form.getvalue('first_name')
#!/bin/bash
COUNT=0
while [ 1 ] ;do
ps -ef | grep sl[Aa]pd-$(hostname -s).pid
if [ $? -ne 0 ]; then
COUNT=$(expr ${COUNT} + 1)
echo "restart count: $COUNT"
cp -r /var/log/dirsrv/ /var/log/dirsrv.${COUNT}
find /var/log/dirsrv/ -type f -exec rm {} \;
/etc/init.d/dirsrv restart
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
[root@poseidon amanda]# /etc/init.d/zmc_aee restart; while [ 1 ]; do echo -n $(echo | openssl s_client -connect poseidon.eftdomain.net:443 -showcerts >/dev/null 2>&1; echo $?); sleep 5; done
ZMC: 201305031301:Stopping ZMC:
ZMC: 201305031301:Stopping ZMC Web Interface
ZMC: 201305031301:ZMC Database Stopped.
ZMC: 201305031301:ZMC Stopped.
ZMC: 201305031301:Starting ZMC 3.3.3.35159:
ZMC: 201305031301:Checking ZMC Installation:
ZMC: 201305031301:ZMC Installation OK
ZMC: 201305031301:Initializing ZMC
ZMC: 201305031301:Starting ZMC Database ..
#!/usr/bin/env perl
use strict;
use Net::LDAP;
my $ldap = Net::LDAP->new( 'ldaps://faraday.eftdomain.net:636' ) or die "$@";
my $mesg = $ldap->bind( "uid=$ENV{'LOGNAME'},ou=People,dc=eftdomain,dc=net", password => "$ENV{'LDAP_PASSWORD'}");
$mesg = $ldap->search( base => 'ou=Card@Once,dc=dev,dc=eftdomain,dc=net', filter => "(ou=erik*)");
foreach my $entry ($mesg->entries) {
$entry->dump;
$mesg = $ldap->delete($entry->dn);
-rwxr-xr-x 1 jameswhite users 28 Jul 17 2012 AUTHORS
-rwxr-xr-x 1 jameswhite users 0 Jul 22 2008 COPYING
-rwxr-xr-x 1 jameswhite users 1 Jul 22 2008 ChangeLog
-rwxr-xr-x 1 jameswhite users 0 Jul 22 2008 INSTALL
-rw-r--r-- 1 jameswhite users 21468 Apr 22 11:13 Makefile
-rwxr-xr-x 1 jameswhite users 1102 Mar 27 2012 Makefile.am
-rw-r--r-- 1 jameswhite users 20546 Jul 17 2012 Makefile.in
-rwxr-xr-x 1 jameswhite users 106 Jul 22 2008 NEWS
-rwxr-xr-x 1 jameswhite users 1667 Jul 22 2008 README
-rwxr-xr-x 1 jameswhite users 1 Jul 22 2008 TODO