Skip to content

Commit c52e3ad

Browse files
committed
add newline to hm_addons.cfg if necessary
1 parent b44634b commit c52e3ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

addon_files/update_script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ fi
2424

2525
touch $CONF_DIR/hm_addons.cfg
2626
sed -i '/node-red/d' $CONF_DIR/hm_addons.cfg
27+
x=$(tail -c 1 $CONF_DIR/hm_addons.cfg)
28+
if [ "$x" != "" ]
29+
then
30+
echo >> $CONF_DIR/hm_addons.cfg
31+
fi
2732
echo "node-red {CONFIG_URL /addons/red CONFIG_DESCRIPTION {de {<li>Node-RED</li>} en {<li>Node-RED</li>}} ID node-red CONFIG_NAME Node-RED}" >> $CONF_DIR/hm_addons.cfg
2833
echo "node-red-dashboard {CONFIG_URL /addons/red/ui CONFIG_DESCRIPTION {de {<li>Node-RED Dashboard UI</li>} en {<li>Node-RED Dashboard UI</li>}} ID node-red-dashboard CONFIG_NAME \"Node-RED Dashboard\"}" >> $CONF_DIR/hm_addons.cfg
2934

0 commit comments

Comments
 (0)