diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index e614bd7e758bb6fa8b89adfb5f95c984aa7a4aa6..5df057f9bd856f2444b6f98fd97d0ed4963cfa3b 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -899,10 +899,14 @@ waitforwrapperstop() { } create_config_dir() { - if ! mkdir -p "$I2P_CONFIG_DIR"; then - echo "Error creating $I2P_CONFIG_DIR! Edit $0 and set I2P_CONFIG_DIR" >&2 - echo "to the correct location." >&2 - exit 1 + if [ ! -d "$I2P_CONFIG_DIR" ]; then + UMASK=$(awk -F'=' '/^ *wrapper\.umask/{print $2}' $WRAPPER_CONF) + umask $UMASK + if ! mkdir -p "$I2P_CONFIG_DIR"; then + echo "Error creating $I2P_CONFIG_DIR! Edit $0 and set I2P_CONFIG_DIR" >&2 + echo "to the correct location." >&2 + exit 1 + fi fi }