Only create app subvolume if it does not exist

Fixes #227
This commit is contained in:
Johannes Zellner
2017-02-17 15:06:47 +01:00
parent b3a5dafee0
commit cd28b1106b
+6 -1
View File
@@ -19,7 +19,12 @@ fi
if [[ "${BOX_ENV}" == "cloudron" ]]; then
readonly app_data_dir="${HOME}/data/$1"
btrfs subvolume create "${app_data_dir}"
# Only create subvolume if it does not exist
if [[ ! -d "${app_data_dir}" ]]; then
btrfs subvolume create "${app_data_dir}"
fi
mkdir -p "${app_data_dir}/data"
chown -R yellowtent:yellowtent "${app_data_dir}"
else