more precise check for /etc/webmin/miniserv.conf

This commit is contained in:
KayM
2017-12-21 23:01:47 +01:00
parent 3a5db83f94
commit 98cc5d1e69

View File

@@ -162,10 +162,10 @@ if [[ $EUID -eq 0 ]]; then
[[ ! -f "${TEMP}/tarballs/${PROD}-${version}/setup.sh" ]] && \
cp "${TEMP}/setup.sh" "${TEMP}/tarballs/${PROD}-${version}/setup.sh"
echo -en "${CYAN}search minserv.conf ... ${NC}"
if [[ -d "/etc/webmin" ]] ; then
MINICONF=`find /etc -name miniserv.conf 2>/dev/null | grep ${PROD} | head -n 1`
else
MINICONF=`find /* -maxdepth 6 -name miniserv.conf 2>/dev/null | grep ${PROD} | head -n 1`
if [[ -f "/etc/webmin/miniserv.conf" ]] ; then
MINICONF=`find /etc -name miniserv.conf 2>/dev/null | grep ${PROD} | head -n 1`
else
MINICONF=`find /* -maxdepth 6 -name miniserv.conf 2>/dev/null | grep ${PROD} | head -n 1`
fi
MINICONF=`grep env_WEBMIN_CONFIG= ${MINICONF}| sed 's/.*_WEBMIN_CONFIG=//'`
echo -e "${ORANGE}found: ${MINICONF}${NC}"