Permalink
Browse files

Allow using either debian or centos style config, without having to c…

…hange the script sources
  • Loading branch information...
1 parent b9ca543 commit 390dddabce4d735bccdb2ca387a79967e0967f9d @kaiinkinen committed Apr 18, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/automongobackup.sh
View
@@ -29,8 +29,11 @@
#=====================================================================
# External config - override default values set below
-# EXTERNAL_CONFIG="/etc/default/automongobackup" # debian style
-EXTERNAL_CONFIG="/etc/sysconfig/automongobackup" # centos style
+if [ -f "/etc/default/automongobackup" ]; then
+ EXTERNAL_CONFIG="/etc/default/automongobackup" # debian style
+elif [ -f "/etc/sysconfig/automongobackup"]; then
+ EXTERNAL_CONFIG="/etc/sysconfig/automongobackup" # centos style
+fi
# Username to access the mongo server e.g. dbuser
# Unnecessary if authentication is off

0 comments on commit 390ddda

Please sign in to comment.