Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Nov 11, 2023
1 parent c1dd7df commit bea4c4a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/static/static/home/yi-hack/script/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ if [[ x$(get_config USERNAME) != "x" ]] ; then
ONVIF_USERPWD="user=$USERNAME\npassword=$PASSWORD"
echo "/onvif::" > /tmp/httpd.conf
echo "/:$USERNAME:$PASSWORD" >> /tmp/httpd.conf
chmod 0600 /tmp/httpd.conf
fi

if [[ x$(get_config SSH_PASSWORD) != "x" ]] ; then
Expand All @@ -149,8 +150,12 @@ if [[ x$(get_config SSH_PASSWORD) != "x" ]] ; then
sed -i 's|^root::|root:x:|g' /etc/passwd
sed -i 's|:/root:|:/home/yi-hack:|g' /etc/passwd
sed -i 's|^root::|root:'${PASSWORD_MD5}':|g' /etc/shadow
chmod 0600 /etc/passwd
chmod 0600 /etc/shadow
else
sed -i 's|:/root:|:/home/yi-hack:|g' /etc/passwd
chmod 0600 /etc/passwd
chmod 0600 /etc/shadow
fi

case $(get_config RTSP_PORT) in
Expand Down
2 changes: 1 addition & 1 deletion src/static/static/home/yi-hack/script/wd_rtsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ check_rtsp()
sleep 1
restart_rtsp
COUNTER=0
fi
fi
else
COUNTER=0
fi
Expand Down
12 changes: 6 additions & 6 deletions src/www/httpd/cgi-bin/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,20 +320,20 @@ if [ "$ACTION" == "start" ] ; then
elif [ "$NAME" == "ftpd" ]; then
start_ftpd $PARAM1
elif [ "$NAME" == "mqtt" ]; then
mqttv4 >/dev/null &
mqtt-config >/dev/null &
mqttv4 > /dev/null &
mqtt-config > /dev/null &
elif [ "$NAME" == "mp4record" ]; then
cd /home/app
./mp4record >/dev/null &
./mp4record > /dev/null &
elif [ "$NAME" == "all" ]; then
start_rtsp
start_onvif
start_wsdd
start_ftpd
mqttv4 >/dev/null &
mqtt-config >/dev/null &
mqttv4 > /dev/null &
mqtt-config > /dev/null &
cd /home/app
./mp4record >/dev/null &
./mp4record > /dev/null &
fi
elif [ "$ACTION" == "stop" ] ; then
if [ "$NAME" == "rtsp" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/www/httpd/htdocs/pages/configurations.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h4 class="no-margin">General</h4>
<option value="pcm">pcm</option>
<option value="alaw">alaw</option>
<option value="ulaw">ulaw</option>
<option value="aac">aac (experimental)</option>
<option value="aac">aac</option>
</select>
</div>
<span class="switch-description">
Expand Down

0 comments on commit bea4c4a

Please sign in to comment.