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
1 changed files with 4 additions and 2 deletions
6
debian/postinst
vendored
6
debian/postinst
vendored
|
@ -25,8 +25,10 @@ case "$1" in
|
|||
# and permissions for the config.
|
||||
mkdir -v -p "$CONDUWUIT_DATABASE_PATH"
|
||||
|
||||
# symlink the previous location for compatibility
|
||||
ln -s -v "$CONDUWUIT_DATABASE_PATH" "/var/lib/matrix-conduit"
|
||||
# symlink the previous location for compatibility if it does not exist yet.
|
||||
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_CONFIG_PATH"
|
||||
|
|
Loading…
Add table
Reference in a new issue