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