Skip to content
Snippets Groups Projects
Commit a1478133 authored by Bob Mottram's avatar Bob Mottram
Browse files

Ensure correct permissions on data directory during upgrades

parent ea971e56
No related branches found
No related tags found
No related merge requests found
......@@ -154,15 +154,16 @@ function reconfigure_privatebin {
}
function upgrade_privatebin {
if grep -q "privatebin domain" "$COMPLETION_FILE"; then
PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
fi
chmod 755 "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/data"
CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
return
fi
if grep -q "privatebin domain" "$COMPLETION_FILE"; then
PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
fi
# update to the next commit
function_check set_repo_commit
set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment