refactor: update digitalocean image building to match what Digitalocean does

The scripts run/installed on the server are based on what was given to me by Digitalocean in 2019, so they may have diverged a bit since.
This commit is contained in:
Jose Diaz-Gonzalez committed 2023-02-16 14:19:10 -05:00
1 parent eba867a3bb
commit 96c737eae4
13 files changed
+333 -32

No files matched your search

@@ -0,0 +1,25 @@
#!/bin/bash -x
set +e
exec > >(tee /var/log/one_click_setup.log) 2>&1
ufw --force enable
printf "dokku dokku/hostname string %s" hostname | debconf-set-selections
export DEBIAN_FRONTEND=noninteractive
export LANG=C
export LC_ALL=C
# Install Dokku....
for count in {1..30}; do
dpkg -i /var/lib/digitalocean/debs/*deb || /bin/true
apt-get -f install || /bin/true
version=$(dpkg-query --showformat='${Version}' -W dokku)
if [[ -n "$version" ]]; then
ran=0
exit 0
else
count=$(($count + 1))
fi
sleep 5
done
@@ -0,0 +1,9 @@
#!/bin/bash
exec > >(tee /var/log/one_click_setup.log) 2>&1
# Remove the force command
sed -e '/Match user root/d' \
-e '/.*ForceCommand.*droplet.*/d' \
-i /etc/ssh/sshd_config
systemctl restart ssh