File label-uninstall of Package neuvector-demo

#!/bin/sh -eu

# This is the uninstall script for neuvector-demo when run in a privileged
# container.
#
# The host file system must be mounted at /host

cd /
PATH="/usr/bin:/usr/sbin"

if [ ! -d /host/etc ] || [ ! -d /host/proc ] || [ ! -d /host/run ]; then
    echo "neuvector-demo-uninstall: host file system is not mounted at /host"
    exit 1
fi

# removing installed files
rm -fr /host/etc/systemd/system/neuvector.service /host/etc/systemd/system/neuvector-allinone.service /host/etc/systemd/system/neuvector-scanner.service /host/etc/containers/kube/neuvector.yaml


# force systemd to reload its config, requires install label to run container to be run pid=host
kill -HUP 1

# Everything else is settings and should remain
openSUSE Build Service is sponsored by