Update nodemgmt-scripts.sh

This commit is contained in:
2019-07-25 22:18:22 -05:00
parent d267877de8
commit 2b0aa074c0

View File

@@ -1094,16 +1094,16 @@ NEWSITE(){
SET-PERMISSIONS(){
if [ "${1}" = "gitea" ]; then
for nip in "${WEB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
NCMD=''
else
NCMD="ssh root@${nip}"
fi
if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for Gitea on Webserver-Node${nid} (${nip})... ${idsCL[Default]}"
fi
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
NCMD=''
else
NCMD="ssh root@${nip}"
fi
if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for Gitea on Webserver-Node${nid} (${nip})... ${idsCL[Default]}"
fi
${NCMD} chown -R git:git /var/lib/gitea
${NCMD} chmod -R 750 /var/lib/gitea
${NCMD} chown -R git:git /home/git
@@ -1111,6 +1111,8 @@ SET-PERMISSIONS(){
if [ "${2}" != "q" ]; then
echo -e "${idsCL[Green]}Complete${idsCL[Default]}"
fi
elif [ "${2}" != "q" ]; then
echo -e "${idsCL[Red]}Node is down${idsCL[Default]}"
fi
done
else