Div visual updates
This commit is contained in:
@@ -49,20 +49,19 @@ do_configure() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "=== System Configuration ==="
|
echo "=== System Configuration ==="
|
||||||
echo "Press Enter to keep the current value, or type a new one."
|
echo "Press Enter to keep the current value, or type a new one."
|
||||||
echo ""
|
|
||||||
|
|
||||||
source "$CONF_FILE"
|
source "$CONF_FILE"
|
||||||
VARS=("TLDOMAIN" "SERVERFQDN_IPA" "DOMAIN" "SERVERFQDN_NC" "IPAVAULTUSE" "IPAVAULTNAME" "DISTCONFIGPATH_SRC" "CLIENTADMINGROUP" )
|
VARS=("TLDOMAIN" "SERVERFQDN_IPA" "DOMAIN" "SERVERFQDN_NC" "IPAVAULTUSE" "IPAVAULTNAME" "DISTCONFIGPATH_SRC" "CLIENTADMINGROUP" )
|
||||||
for ELE in "${VARS[@]}"
|
for ELE in "${VARS[@]}"
|
||||||
do
|
do
|
||||||
while true; do
|
while true; do
|
||||||
|
echo ""
|
||||||
new_ELE=$(prompt_value "${ELE}" "${!ELE}")
|
new_ELE=$(prompt_value "${ELE}" "${!ELE}")
|
||||||
set_conf_var "${ELE}" "${new_ELE}"
|
set_conf_var "${ELE}" "${new_ELE}"
|
||||||
source "$CONF_FILE"
|
source "$CONF_FILE"
|
||||||
REPEAT_TEST=1
|
REPEAT_TEST=1
|
||||||
case ${ELE} in
|
case ${ELE} in
|
||||||
"SERVERFQDN_NC") echo ""
|
"SERVERFQDN_NC") echo "=== Testing: Nextcloud server ==="
|
||||||
echo "=== Testing: Nextcloud server ==="
|
|
||||||
NC_STATUS=$(curl -fsSL "https://${SERVERFQDN_NC}/status.php" 2>/dev/null)
|
NC_STATUS=$(curl -fsSL "https://${SERVERFQDN_NC}/status.php" 2>/dev/null)
|
||||||
if echo "$NC_STATUS" | grep -q '"installed":true'; then
|
if echo "$NC_STATUS" | grep -q '"installed":true'; then
|
||||||
NC_VERSION=$(echo "$NC_STATUS" | grep -oP '(?<="versionstring":")[^"]+')
|
NC_VERSION=$(echo "$NC_STATUS" | grep -oP '(?<="versionstring":")[^"]+')
|
||||||
@@ -79,8 +78,7 @@ do_configure() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"SERVERFQDN_IPA") echo ""
|
"SERVERFQDN_IPA") echo "=== Testing: FreeIPA server ==="
|
||||||
echo "=== Testing: FreeIPA server ==="
|
|
||||||
IPA_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
IPA_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
"https://${SERVERFQDN_IPA}/ipa/session/json" 2>/dev/null)
|
"https://${SERVERFQDN_IPA}/ipa/session/json" 2>/dev/null)
|
||||||
if [[ "$IPA_CODE" == "200" || "$IPA_CODE" == "401" ]]; then
|
if [[ "$IPA_CODE" == "200" || "$IPA_CODE" == "401" ]]; then
|
||||||
@@ -97,8 +95,7 @@ do_configure() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"DOMAIN") echo ""
|
"DOMAIN") echo "=== Testing: IPA Domain DNS records ==="
|
||||||
echo "=== Testing: IPA Domain DNS records ==="
|
|
||||||
if ! command -v dig &>/dev/null; then
|
if ! command -v dig &>/dev/null; then
|
||||||
echo "WARNING: 'dig' not found; skipping DNS check."
|
echo "WARNING: 'dig' not found; skipping DNS check."
|
||||||
REPEAT_TEST=0
|
REPEAT_TEST=0
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
#Check Token
|
#Check Token
|
||||||
if [ "${DAVTOKEN_USER}." == "." ]; then
|
if [ "${DAVTOKEN_USER}." == "." ]; then
|
||||||
echo "Error: Script cannot be executed standalone, must be run with a matching sudo rule and needs a prereserved environement from logon-script."
|
echo "Error: Script cannot be executed standalone, must be run with a matching sudo rule and needs a prereserved environment from logon-script."
|
||||||
echo "A matching sudo rule could look like this: "'^'${SYSCONFIGPATH////'\/'}'\/system_setup\/sync_client_software\.sh.*$'
|
echo "A matching sudo rule could look like this: "'^'${SYSCONFIGPATH////'\/'}'\/system_setup\/sync_client_software\.sh.*$'
|
||||||
echo "Hint: the rule must contain the !authenticate and setenv option to work."
|
echo "Hint: the rule must contain the !authenticate and setenv option to work."
|
||||||
echo "Press any key to continue" && read -n 1 -s -r && exit 1
|
echo "Press any key to continue" && read -n 1 -s -r && exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user