diff --git a/src/freedombone-app-privatebin b/src/freedombone-app-privatebin index b7697554..c579266b 100755 --- a/src/freedombone-app-privatebin +++ b/src/freedombone-app-privatebin @@ -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"