Ensure correct permissions on data directory during upgrades
This commit is contained in:
parent
ea971e5682
commit
a14781337f
|
@ -154,15 +154,16 @@ function reconfigure_privatebin {
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgrade_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")
|
CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
|
||||||
if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
|
if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "privatebin domain" "$COMPLETION_FILE"; then
|
|
||||||
PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# update to the next commit
|
# update to the next commit
|
||||||
function_check set_repo_commit
|
function_check set_repo_commit
|
||||||
set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
|
set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
|
||||||
|
|
Loading…
Reference in New Issue