cleanup directory strucutre and fine tune

This commit is contained in:
Joe Tretter
2022-09-30 10:55:07 -05:00
parent dae7fbc9e7
commit 9b25fa2eda
19 changed files with 69 additions and 27 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt -y update
apt -y upgrade
apt -y update
apt -y install podman
podman image load -i /tmp/dumbserver.image.tar
# create the directory for the data file and, if not existing (which is the default) copy the example file
mkdir -p /var/local/dumbserver
if [ ! -f /var/local/dumbserver/data ]; then
cp /tmp/data /var/local/dumbserver/
fi
podman run --name dumbserver -d -p 1280:1280 -v /var/local/dumbserver:/nodejsapp/dataDir dumbserver
# make sure it comes up after reboot...
podman generate systemd --new --name dumbserver > /etc/systemd/system/dumbserver-podman.service
systemctl daemon-reload
systemctl enable dumbserver-podman.service
# finally, all is set up and after all the updates we want to reboot into the new kernel version
shutdown -r 1