mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-24 22:06:00 +08:00
make the variables check more verbose
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
732c8e7dd9
commit
9af6a5fe4d
1 changed files with 6 additions and 3 deletions
|
@ -78,7 +78,8 @@ if [ -n "$NEXTCLOUD_DATADIR" ]; then
|
|||
&& ! echo "$NEXTCLOUD_DATADIR" | grep -q "^/host_mnt/"
|
||||
then
|
||||
echo "You've set NEXTCLOUD_DATADIR but not to an allowed value.
|
||||
The string must start with '/mnt/', '/media/' or '/host_mnt/'. E.g. '/mnt/ncdata'"
|
||||
The string must start with '/mnt/', '/media/' or '/host_mnt/'. E.g. '/mnt/ncdata'.
|
||||
It is set to '$NEXTCLOUD_DATADIR'."
|
||||
exit 1
|
||||
elif [ "$NEXTCLOUD_DATADIR" = "/mnt/" ] || [ "$NEXTCLOUD_DATADIR" = "/media/" ] || [ "$NEXTCLOUD_DATADIR" = "/host_mnt/" ]; then
|
||||
echo "You've set NEXTCLOUD_DATADIR but not to an allowed value.
|
||||
|
@ -93,7 +94,8 @@ if [ -n "$NEXTCLOUD_MOUNT" ]; then
|
|||
&& ! echo "$NEXTCLOUD_MOUNT" | grep -q "^/var/backups$"
|
||||
then
|
||||
echo "You've set NEXCLOUD_MOUNT but not to an allowed value.
|
||||
The string must be equal to/start with '/mnt/', '/media/' or '/host_mnt/' or be equal to '/var/backups'."
|
||||
The string must be equal to/start with '/mnt/', '/media/' or '/host_mnt/' or be equal to '/var/backups'.
|
||||
It is set to '$NEXTCLOUD_DATADIR'."
|
||||
exit 1
|
||||
elif [ "$NEXTCLOUD_MOUNT" = "/mnt/ncdata" ] || echo "$NEXTCLOUD_MOUNT" | grep -q "^/mnt/ncdata/"; then
|
||||
echo "/mnt/ncdata and /mnt/ncdata/ are not allowed for NEXTCLOUD_MOUNT."
|
||||
|
@ -108,7 +110,8 @@ if [ -n "$NEXTCLOUD_DATADIR" ] && [ -n "$NEXTCLOUD_MOUNT" ]; then
|
|||
fi
|
||||
if [ -n "$APACHE_PORT" ]; then
|
||||
if ! check_if_number "$APACHE_PORT"; then
|
||||
echo "You provided an Apache port but did not only use numbers"
|
||||
echo "You provided an Apache port but did not only use numbers.
|
||||
It is set to '$APACHE_PORT'."
|
||||
exit 1
|
||||
elif ! [ "$APACHE_PORT" -le 65535 ] || ! [ "$APACHE_PORT" -ge 1 ]; then
|
||||
echo "The provided Apache port is invalid. It must be between 1 and 65535"
|
||||
|
|
Loading…
Reference in a new issue