Check if database symlink already exists
test -L $object [object exists and is a symbolic link (same as -h)] It is not recommended to use -h [True if file exists and is a symbolic link. This operator is retained for compatibility with previous versions of this program. Do not rely on its existence; use -L instead.]
This commit is contained in:
parent
b8b93a2e86
commit
f4cfc77a57
|
@ -25,8 +25,10 @@ case "$1" in
|
||||||
# and permissions for the config.
|
# and permissions for the config.
|
||||||
mkdir -v -p "$CONDUWUIT_DATABASE_PATH"
|
mkdir -v -p "$CONDUWUIT_DATABASE_PATH"
|
||||||
|
|
||||||
# symlink the previous location for compatibility
|
# symlink the previous location for compatibility if it does not exist yet.
|
||||||
ln -s -v "$CONDUWUIT_DATABASE_PATH" "/var/lib/matrix-conduit"
|
if ! test -L "/var/lib/matrix-conduit" ; then
|
||||||
|
ln -s -v "$CONDUWUIT_DATABASE_PATH" "/var/lib/matrix-conduit"
|
||||||
|
fi
|
||||||
|
|
||||||
chown -v conduwuit:conduwuit -R "$CONDUWUIT_DATABASE_PATH"
|
chown -v conduwuit:conduwuit -R "$CONDUWUIT_DATABASE_PATH"
|
||||||
chown -v conduwuit:conduwuit -R "$CONDUWUIT_CONFIG_PATH"
|
chown -v conduwuit:conduwuit -R "$CONDUWUIT_CONFIG_PATH"
|
||||||
|
|
Loading…
Reference in New Issue