[Update, Config] Set mode 600 for mailcow.conf

master
andryyy 2019-03-12 23:23:38 +01:00
parent 837ee3b3b0
commit 5b8a983be2
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,7 @@ if [ -f mailcow.conf ]; then
case $response in case $response in
[yY][eE][sS]|[yY]) [yY][eE][sS]|[yY])
mv mailcow.conf mailcow.conf_backup mv mailcow.conf mailcow.conf_backup
chmod 600 mailcow.conf_backup
;; ;;
*) *)
exit 1 exit 1
@ -237,5 +238,7 @@ EOF
mkdir -p data/assets/ssl mkdir -p data/assets/ssl
chmod 600 mailcow.conf
# copy but don't overwrite existing certificate # copy but don't overwrite existing certificate
cp -n data/assets/ssl-example/*.pem data/assets/ssl/ cp -n data/assets/ssl-example/*.pem data/assets/ssl/

View File

@ -101,6 +101,7 @@ while (($#)); do
done done
[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;} [[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;}
chmod 600 mailcow.conf
source mailcow.conf source mailcow.conf
DOTS=${MAILCOW_HOSTNAME//[^.]}; DOTS=${MAILCOW_HOSTNAME//[^.]};
if [ ${#DOTS} -lt 2 ]; then if [ ${#DOTS} -lt 2 ]; then