fix port increment issue (#88)

This commit is contained in:
paukstelis
2023-05-21 20:13:13 -04:00
committed by GitHub
parent 66de13b14f
commit aea4c30e3e

View File

@@ -511,14 +511,13 @@ add_camera() {
read CAMPORT
if [ -z "$CAMPORT" ]; then
CAMPORT=$(tail -1 /etc/camera_ports)
fi
if [ -z "$CAMPORT" ]; then
CAMPORT=8000
if [ -z "$CAMPORT" ]; then
CAMPORT=8000
fi
CAMPORT=$((CAMPORT+1))
fi
CAMPORT=$((CAMPORT+1))
if [ $CAMPORT -gt 7000 ]; then
break
else
@@ -976,33 +975,33 @@ firstrun() {
echo
if prompt_confirm "Do you want to setup your admin user now?"; then
while true; do
echo 'Enter admin user name (no spaces): '
read OCTOADMIN
if [ -z "$OCTOADMIN" ]; then
echo -e "No admin user given! Defaulting to: \033[0;31moctoadmin\033[0m"
OCTOADMIN=octoadmin
fi
if ! has-space "$OCTOADMIN"; then
break
else
echo "Admin user name must not have spaces."
fi
echo 'Enter admin user name (no spaces): '
read OCTOADMIN
if [ -z "$OCTOADMIN" ]; then
echo -e "No admin user given! Defaulting to: \033[0;31moctoadmin\033[0m"
OCTOADMIN=octoadmin
fi
if ! has-space "$OCTOADMIN"; then
break
else
echo "Admin user name must not have spaces."
fi
done
echo "Admin user: $OCTOADMIN"
while true; do
echo 'Enter admin user password (no spaces): '
read OCTOPASS
if [ -z "$OCTOPASS" ]; then
echo -e "No password given! Defaulting to: \033[0;31mfooselrulz\033[0m. Please CHANGE this."
OCTOPASS=fooselrulz
fi
echo 'Enter admin user password (no spaces): '
read OCTOPASS
if [ -z "$OCTOPASS" ]; then
echo -e "No password given! Defaulting to: \033[0;31mfooselrulz\033[0m. Please CHANGE this."
OCTOPASS=fooselrulz
fi
if ! has-space "$OCTOPASS"; then
break
else
echo "Admin password cannot contain spaces"
fi
if ! has-space "$OCTOPASS"; then
break
else
echo "Admin password cannot contain spaces"
fi
done
echo "Admin password: $OCTOPASS"