Commit 91998a36 authored by Heinz N. Gies's avatar Heinz N. Gies

Copy example file if .toml doesn't exist

parent 8651ce3e
Pipeline #14220231 passed with stages
in 12 minutes 41 seconds
#!/bin/sh
if [ ! -d /usr/local/etc/vmadm ]
then
then
mkdir -p /usr/local/etc/vmadm
fi
if [ ! -d /var/imgadm/images ]
then
mkdir -p /var/imgadm/images
if [ ! -f /usr/local/etc/vmadm.toml ]
then
cp /usr/local/lib/vmadm/vmadm.toml.example /usr/local/etc/vmadm.toml
fi
CONFFILE="/usr/local/etc/vmadm.toml"
if [ ! -f $CONFFILE ]
if [ ! -d /var/imgadm/images ]
then
echo "Creating new configuration from example file."
cat <<EOF > $CONFFILE
pool = "zroot/jails"
[networks]
admin = "bridge0"
EOF
else
echo "Please make sure you update your config according to the update manual!"
mkdir -p /var/imgadm/images
fi
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 to comment