Fixes for recent changes (#87)

* some fixes

* set fixes

* some rest

* add shellcheck ignore and explaination

* fix iocage install dir not being exported

* reset branch to dev
This commit is contained in:
Kjeld Schouten-Lebbing 2020-04-26 17:56:13 +02:00 committed by GitHub
parent 2c75cfe0ea
commit 8659f2c252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 6 deletions

View File

@ -28,8 +28,43 @@ example: example
pkgs: mono
plex: plex
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
beta: false
lidarr: lidarr
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
sonarr: sonarr
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
radarr: radarr
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
kms: kms
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
jackett: jackett
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
organizr: organizr
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
tautulli: tautulli
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
transmission: transmission
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1
nextcloud: nextcloud
ip4_addr: 192.168.1.99/24
gateway: 192.168.1.1

View File

@ -3,15 +3,15 @@
# yml Parser function
# Based on https://gist.github.com/pkuczynski/8665367
# shellcheck disable=SC2086
#
# This function is very picky and complex. Ignore with shellcheck for now.
# shellcheck disable=SC2086,SC2155
parse_yaml() {
prefix=${2}
s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
local prefix
local s w fs
local prefix=${2}
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" "${1}" |
awk -F"${fs}" '{
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}

View File

@ -100,8 +100,10 @@ while getopts ":i:r:u:d:g:h" opt
esac
done
# auto detect iocage install location
global_dataset_iocage=$(zfs get -H -o value mountpoint $(iocage get -p)/iocage)
global_dataset_iocage=${global_dataset_iocage#/mnt/}
export global_dataset_iocage
# Parse the Config YAML
# shellcheck disable=SC2046