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:
parent
2c75cfe0ea
commit
8659f2c252
@ -28,8 +28,43 @@ example: example
|
|||||||
pkgs: mono
|
pkgs: mono
|
||||||
|
|
||||||
plex: plex
|
plex: plex
|
||||||
|
ip4_addr: 192.168.1.99/24
|
||||||
|
gateway: 192.168.1.1
|
||||||
beta: false
|
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
|
nextcloud: nextcloud
|
||||||
ip4_addr: 192.168.1.99/24
|
ip4_addr: 192.168.1.99/24
|
||||||
gateway: 192.168.1.1
|
gateway: 192.168.1.1
|
||||||
|
12
global.sh
12
global.sh
@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
# yml Parser function
|
# yml Parser function
|
||||||
# Based on https://gist.github.com/pkuczynski/8665367
|
# 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() {
|
parse_yaml() {
|
||||||
prefix=${2}
|
local prefix=${2}
|
||||||
s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
|
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
|
||||||
local prefix
|
|
||||||
local s w fs
|
|
||||||
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
|
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}" |
|
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" "${1}" |
|
||||||
awk -F"${fs}" '{
|
awk -F$fs '{
|
||||||
indent = length($1)/2;
|
indent = length($1)/2;
|
||||||
vname[indent] = $2;
|
vname[indent] = $2;
|
||||||
for (i in vname) {if (i > indent) {delete vname[i]}}
|
for (i in vname) {if (i > indent) {delete vname[i]}}
|
||||||
|
@ -100,8 +100,10 @@ while getopts ":i:r:u:d:g:h" opt
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# auto detect iocage install location
|
||||||
global_dataset_iocage=$(zfs get -H -o value mountpoint $(iocage get -p)/iocage)
|
global_dataset_iocage=$(zfs get -H -o value mountpoint $(iocage get -p)/iocage)
|
||||||
global_dataset_iocage=${global_dataset_iocage#/mnt/}
|
global_dataset_iocage=${global_dataset_iocage#/mnt/}
|
||||||
|
export global_dataset_iocage
|
||||||
|
|
||||||
# Parse the Config YAML
|
# Parse the Config YAML
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
|
Loading…
Reference in New Issue
Block a user