Automatically detect mountpoint for iocage (#80)

* automate grabbing iocage dataset instead of hardcoding

* move iocage dataset define to jailman.sh instead of config.yml
It can still be overriden by config.yml
This commit is contained in:
Kjeld Schouten-Lebbing 2020-04-25 19:47:11 +02:00 committed by kjeld Schouten-Lebbing
parent dc6eb4a4b7
commit 759da942d2
2 changed files with 3 additions and 2 deletions

View File

@ -3,8 +3,6 @@ global:
dataset:
# dataset for internal jail config files
config: tank/apps
# Iocage root dataset
iocage: tank/iocage
# Media library dataset
media: tank/media
# Parent downloads dataset

View File

@ -84,6 +84,9 @@ while getopts ":i:r:u:d:g:h" opt
esac
done
global_dataset_iocage=$(zfs get -H -o value mountpoint $(iocage get -p)/iocage)
global_dataset_iocage=${global_dataset_iocage#/mnt/}
# Parse the Config YAML
for configpath in ${SCRIPT_DIR}/jails/*/config.yml; do ! eval $(parse_yaml ${configpath}); done
eval $(parse_yaml config.yml)