Skip to content

Instantly share code, notes, and snippets.

View AndreyKozlov1984's full-sized avatar

Andrey Kozlov AndreyKozlov1984

View GitHub Profile
@AndreyKozlov1984
AndreyKozlov1984 / .markdown
Created April 12, 2024 15:45
Мой первый пример
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
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 \