View restart.sh
This file contains 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
cp /tmp/restart.sh /home/vagrant/restart.sh | |
cat << "ENDSSH" > /etc/cron.d/restart | |
1 1,5,9,13,17,21 * * * vagrant /bin/bash -l /home/vagrant/restart.sh > /home/vagrant/restart_log 2>&1 | |
ENDSSH | |
chown root:root /etc/cron.d/restart | |
chmod 644 /etc/cron.d/restart |
View pg.bash
This file contains 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
set -e | |
install_postgres () { | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
apt-get -y install wget ca-certificates | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - | |
apt-get update | |
apt-get -y install \ | |
postgresql-9.4 \ |