#!/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