Skip to content

Instantly share code, notes, and snippets.

@yatesr
yatesr / install-datim-node.sh
Last active March 24, 2016 13:31
Script for installing OHIE Datim Node
#!/bin/sh
# This script will install the OpenHIE Datim Node distro. It is suggested to run this only on
# a clean Ubuntu 14.04 64-bit system.
# Add required ppas. Note: these will change for the official release.
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:openhie/datim
sudo apt-get update
# Set prompts to preconfigured answers in debconf.
### Keybase proof
I hereby claim:
* I am yatesr on github.
* I am ryanyates (https://keybase.io/ryanyates) on keybase.
* I have a public key whose fingerprint is 4E8D 1A40 EEA7 B137 5B40 DAA3 32A0 90F1 1DE8 BCB8
To claim this, I am signing this object:
@yatesr
yatesr / ssh_gen_host_keys
Created May 8, 2015 20:08
openvz gen_ssh_host_key ubuntu-14.04
#!/bin/sh
### BEGIN INIT INFO
# Provides: Generates new ssh host keys on first boot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Generates new ssh host keys on first boot
# Description: Generates new ssh host keys on first boot
### END INIT INFO
@yatesr
yatesr / openhim-mediator-xds
Created February 6, 2015 15:23
OpenHIM mediator XDS init
#!/bin/sh
### BEGIN INIT INFO
# Provides: openhim-mediator-xds
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
##
# Required modules: puppetlabs/apt, kayak/bamboo_agent
##
class prepare {
class { 'apt':
always_apt_update => true,
}
apt::ppa { 'ppa:natecarlson/maven3': }
}
include prepare
@yatesr
yatesr / bamboo-agent
Created January 15, 2014 20:24
Init script for starting/stopping a bamboo agent
#!/bin/bash
# bamboo-agent Init script for running bamboo agent
#
# chkconfig: 2345 98 02
#
# description: Starts and stops bamboo agent
# This is just a delegator to the Bamboo agent script.
USER=bamboo
AGENT_HOME=/home/$USER/bamboo-agent-home/bin
@yatesr
yatesr / updateprod.sh
Created October 18, 2013 15:02
Ansible script for updating prod boxes (WIP)
#!/bin/bash
## updateprod.sh
# Updated: 2013-10-18
# Tested with: Ubuntu 12.04 x64
# Description: Script for updating production machines using ansible
# This script assumes that production machines are defined at /etc/ansible/hosts under [prod]
# The script will first use ansible with --check to show packages that will be updated and then prompt the user to continue with updating by entering (y)es or exit and NOT update packages by entering (n)o or anything else besides y. This also uses the current logged in user and the public/private key for authentication to each machine.
##
echo "Running ansible with --check..."