mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-23 02:27:05 +00:00
Fixed SC2164: Use 'cd ... || exit' in case cd fails.
This commit is contained in:
parent
30c4681e80
commit
33559bb844
@ -74,7 +74,7 @@ if [ ! -d "$HOME/mailinabox" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Change directory to it.
|
# Change directory to it.
|
||||||
cd "$HOME/mailinabox"
|
cd "$HOME/mailinabox" || exit
|
||||||
|
|
||||||
# Update it.
|
# Update it.
|
||||||
if [ "$TAG" != $(git describe --always) ]; then
|
if [ "$TAG" != $(git describe --always) ]; then
|
||||||
|
@ -310,7 +310,7 @@ EOF
|
|||||||
# Execute Nextcloud's setup step, which creates the Nextcloud sqlite database.
|
# Execute Nextcloud's setup step, which creates the Nextcloud sqlite database.
|
||||||
# It also wipes it if it exists. And it updates config.php with database
|
# It also wipes it if it exists. And it updates config.php with database
|
||||||
# settings and deletes the autoconfig.php file.
|
# settings and deletes the autoconfig.php file.
|
||||||
(cd /usr/local/lib/owncloud; sudo -u www-data php"$PHP_VER" /usr/local/lib/owncloud/index.php;)
|
(cd /usr/local/lib/owncloud || exit; sudo -u www-data php"$PHP_VER" /usr/local/lib/owncloud/index.php;)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update config.php.
|
# Update config.php.
|
||||||
|
Loading…
Reference in New Issue
Block a user