Commit 44727d4b by source_reader

bug fixes and updates

parent 572795a8
......@@ -13,9 +13,10 @@ add-apt-repository universe
apt-get update
apt install puppet-agent git r10k -y
pip3 install --upgrade pip
# create the ubuntu user for the livecd
#adduser ubuntu --quiet --disabled-password --gecos ""
#echo -e 'ubuntu\nubuntu\n' | passwd ubuntu
#adduser ubuntu sudo
#adduser ubuntu dialout
# create the ubuntu user for logging into container, remove when done
adduser ubuntu --quiet --disabled-password --gecos ""
echo -e 'ubuntu\nubuntu\n' | passwd ubuntu
adduser ubuntu sudo
adduser ubuntu dialout
......@@ -28,7 +28,7 @@ class static_sites {
require => File['/var/www/frontend']
}
file{'/etc/apache2/conf-enabled/passenger_prestart.conf;:
file{'/etc/apache2/conf-enabled/passenger_prestart.conf':
source => 'puppet:///modules/static_sites/passenger_prestart.conf',
owner => root,
group => root,
......
......@@ -15,7 +15,7 @@ apt-get upgrade -y
apt install puppet git r10k -y
# install postgres and timescale
apt install postgres libpq-dev postgresql-server-dev-11 libssl-dev clang-format
apt install postgresql libpq-dev postgresql-server-dev-11 libssl-dev clang-format cmake -y
git clone https://github.com/timescale/timescaledb.git
cd timescaledb
git checkout 1.4.0
......
......@@ -10,26 +10,14 @@ sudo -u postgres psql <<END_OF_SQL
DROP DATABASE joule;
DROP DATABASE rails;
END_OF_SQL
echo "3] Erasing module and stream configurations"
echo "2] Erasing module and stream configurations"
rm -f /etc/joule/module_configs/*.conf
rm -f /etc/joule/stream_configs/*.conf
echo "4] Removing default key material"
echo "3] Removing default key material"
rm -f /etc/joule/security/*
rm -f /opt/api/config/secrets.yml
echo "5] Reverting apt sources"
cat > /etc/apt/sources.list <<EOF
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
EOF
cat > /etc/apt/sources.list.d/raspi.list <<EOF
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
EOF
apt update
apt upgrade -y
echo "6] Configuring root fs resize for first boot"
echo "4] Configuring root fs resize for first boot"
PARTUUID="$(blkid -o export /dev/mmcblk0p2 | grep PARTUUID)"
cat > /boot/cmdline.txt <<EOF
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=$PARTUUID rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles
......@@ -66,12 +54,12 @@ EOF
chmod +x /etc/init.d/resize2fs_once
systemctl enable resize2fs_once
echo "7] Cleanup home directory"
echo "5] Cleanup home directory"
cd /home/pi
ls -A | grep ^'\.' | grep -Ev ".bashrc|.bash_logout|.local|.profile" | xargs rm -rf
cd /root
ls -A | grep ^'\.' | grep -Ev ".bashrc|.profile|.vnc" | xargs rm -rf
echo "8] Enabling piwiz"
echo "6] Enabling piwiz"
cat > /etc/xdg/autostart/piwiz.desktop <<EOF
[Desktop Entry]
Type=Application
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment