#!/bin/bash

dockerDeleteData()
{
    local app_name="$1"

    if [[ "$app_name" == "" ]]; then
        isError "No app_name provided, unable to continue..."
    else
        # Runs via the root-owned helper instead of runFileOp (= dockerinstall),
        # so container sub-UID dirs (postgres uid 232070, www-data uid 33, …)
        # are wiped instead of left behind with a "Permission denied" error
        # and a misleading "successfully uninstalled" message.
        runOwnership app-data-remove "$app_name"
        checkSuccess "Deleting $app_name install folder"
    fi

}