Reading mirrors from config file
This commit is contained in:
parent
bd24d4f886
commit
c078225608
|
@ -331,6 +331,9 @@ function save_configuration_file {
|
|||
if [ $FRIENDS_MIRRORS_PASSWORD ]; then
|
||||
echo "FRIENDS_MIRRORS_PASSWORD=$FRIENDS_MIRRORS_PASSWORD" >> $CONFIGURATION_FILE
|
||||
fi
|
||||
if [ $MY_MIRRORS_PASSWORD ]; then
|
||||
echo "MY_MIRRORS_PASSWORD=$MY_MIRRORS_PASSWORD" >> $CONFIGURATION_FILE
|
||||
fi
|
||||
}
|
||||
|
||||
# test a domain name to see if it's valid
|
||||
|
|
|
@ -50,6 +50,18 @@ function read_configuration {
|
|||
if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then
|
||||
cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg
|
||||
fi
|
||||
if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
|
||||
FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
|
||||
FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MY_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
|
||||
MY_MIRRORS_PASSWORD=$(grep "MY_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "REFRESH_GPG_KEYS_HOURS" $CONFIGURATION_FILE; then
|
||||
REFRESH_GPG_KEYS_HOURS=$(grep "REFRESH_GPG_KEYS_HOURS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue