Skip to content

Commit

Permalink
[Fix] Saving function
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   src/www/httpd/cgi-bin/set_configs.sh
  • Loading branch information
alienatedsec committed Aug 3, 2023
1 parent b51b105 commit 08385ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/www/httpd/cgi-bin/set_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ for ROW in $ROWS; do
hostname $VALUE
echo "$VALUE" > $YI_HACK_PREFIX/etc/hostname
fi
elif
if [ "$KEY" == "TIMEZONE" ] ; then
echo $VALUE > /etc/TZ
fi
elif [ "$KEY" == "MOTION_IMAGE_DELAY" ] ; then
if $(validateNumber $VALUE); then
VALUE=$(echo $VALUE | sed 's/,/./g')
Expand All @@ -118,6 +114,9 @@ for ROW in $ROWS; do
sed -i "s/^\(${KEY}\s*=\s*\).*$/\1${VALUE}/" $CONF_FILE
fi
else
if [ "$KEY" == "TIMEZONE" ] ; then
echo $VALUE > /etc/TZ
fi
VALUE=$(echo "$VALUE" | sedencode)
sed -i "s/^\(${KEY}[[:blank:]]*=[[:blank:]]*\).*$/\1${VALUE}/" $CONF_FILE
fi
Expand Down

0 comments on commit 08385ac

Please sign in to comment.