You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have removed the default initial_storage directory in my WebDAV plugin, as it is "empty" (I do not deliver my plugin with the default foo.txt provided by metwork in this directory, it seems obvious to me) and I have no initial file(s) to write on the WebDAV.
But without this (useless) initial_storage directory into the plugin, the WebDAV directory (by default ~/var/storage/<plugin>/) is not created, that's annoying...
Solution
In adm/_plugins.postinstall, replace:
if test "${USE_STORAGE}" = "1"; then
mkdir -p "${MFBASE_NGINX_STORAGE_DIR}"
if test -d "${PLUGIN_HOME}/initial_storage"; then
rm -Rf "${MFBASE_NGINX_STORAGE_DIR:?}/${NAME}"
cp -Rf "${PLUGIN_HOME}/initial_storage" "${MFBASE_NGINX_STORAGE_DIR}/${NAME}"
fi
fi
by something like this:
if test "${USE_STORAGE}" = "1"; then
mkdir -p "${MFBASE_NGINX_STORAGE_DIR}/${NAME}"
if test -d "${PLUGIN_HOME}/initial_storage"; then
cp -Rf "${PLUGIN_HOME}/initial_storage/*" "${MFBASE_NGINX_STORAGE_DIR}/${NAME}/"
fi
fi
So the plugin's storage dir is created if not exists (we keep existing one in case it exists) and we copy files from initial_storage (if exists) in it.
The text was updated successfully, but these errors were encountered:
Problem
I have removed the default
initial_storage
directory in my WebDAV plugin, as it is "empty" (I do not deliver my plugin with the defaultfoo.txt
provided by metwork in this directory, it seems obvious to me) and I have no initial file(s) to write on the WebDAV.But without this (useless)
initial_storage
directory into the plugin, the WebDAV directory (by default~/var/storage/<plugin>/
) is not created, that's annoying...Solution
In
adm/_plugins.postinstall
, replace:by something like this:
So the plugin's storage dir is created if not exists (we keep existing one in case it exists) and we copy files from initial_storage (if exists) in it.
The text was updated successfully, but these errors were encountered: