mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 03:01:01 +01:00
release validation fixes
This commit is contained in:
@@ -140,14 +140,14 @@ generate_config() {
|
||||
if [ "${FILE_EXT}" = ".zip" ]; then
|
||||
# Gather some bits from foreign/iocage config files
|
||||
JSON_CONFIG="${bastille_jailsdir}/${TARGET_TRIM}/config.json"
|
||||
if [ -f "${JSON_CONFIG}" ]; then
|
||||
if [ -n "${JSON_CONFIG}" ]; then
|
||||
IPV4_CONFIG=$(grep -wo '\"ip4_addr\": \".*\"' "${JSON_CONFIG}" | tr -d '" ' | sed 's/ip4_addr://')
|
||||
IPV6_CONFIG=$(grep -wo '\"ip6_addr\": \".*\"' "${JSON_CONFIG}" | tr -d '" ' | sed 's/ip6_addr://')
|
||||
fi
|
||||
elif [ "${FILE_EXT}" = ".tar.gz" ]; then
|
||||
# Gather some bits from foreign/ezjail config files
|
||||
PROP_CONFIG="${bastille_jailsdir}/${TARGET_TRIM}/prop.ezjail-${FILE_TRIM}-*"
|
||||
if [ -f "${PROP_CONFIG}" ]; then
|
||||
if [ -n "${PROP_CONFIG}" ]; then
|
||||
IPVX_CONFIG=$(grep -wo "jail_${TARGET_TRIM}_ip=.*" ${PROP_CONFIG} | tr -d '" ' | sed "s/jail_${TARGET_TRIM}_ip=//")
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user