Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix permission error on Synology NAS #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ create_datadir() {
find ${PG_DATADIR} -type d -exec chmod 0700 {} \;
fi
chown -R ${PG_USER}:${PG_USER} ${PG_HOME}
chmod 700 ${PG_HOME}
}

create_certdir() {
Expand Down Expand Up @@ -70,7 +71,7 @@ set_postgresql_param() {
echo "‣ Setting postgresql.conf parameter: ${key} = '${value}'"
fi
value="$(echo "${value}" | sed 's|[&]|\\&|g')"
exec_as_postgres sed -i "s|^[#]*[ ]*${key} = .*|${key} = '${value}'|" ${PG_CONF}
sed -i "s|^[#]*[ ]*${key} = .*|${key} = '${value}'|" ${PG_CONF}
fi
fi
}
Expand All @@ -86,7 +87,7 @@ set_recovery_param() {
true) echo "‣ Setting primary_conninfo parameter: ${key}" ;;
*) echo "‣ Setting primary_conninfo parameter: ${key} = '${value}'" ;;
esac
exec_as_postgres sed -i "s|${key}=[^ ']*|${key}=${value}|" ${PG_RECOVERY_CONF}
sed -i "s|${key}=[^ ']*|${key}=${value}|" ${PG_RECOVERY_CONF}
fi
fi
}
Expand Down