配置文件:修订间差异

来自Domoticz
跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
第5行: 第5行:
[[file:屏幕快照_2017-08-04_15.13.36.jpg]]
[[file:屏幕快照_2017-08-04_15.13.36.jpg]]


[code]DAEMON_ARGS="$DAEMON_ARGS -www 8080"
<code>DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"[/code]
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"</code>
这两行分别是http与https的端口号设置。
这两行分别是http与https的端口号设置。




[code]#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"[/code]
<code]#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"</code>
此行用来设置Domoticz日志记录,要启用日志记录需要将行首的井号#删掉,“/tmp/domoticz.txt”是用来存放日志的文件。
此行用来设置Domoticz日志记录,要启用日志记录需要将行首的井号#删掉,“/tmp/domoticz.txt”是用来存放日志的文件。
以后Domoticz出现问题,直接查看此文件即可。
以后Domoticz出现问题,直接查看此文件即可。
第17行: 第17行:
树莓派中,设置开机自动启动Domoticz时,此文件复制到了“/etc/init.d/”目录中,修改时也需要修改“/etc/init.d/domoticz.sh”
树莓派中,设置开机自动启动Domoticz时,此文件复制到了“/etc/init.d/”目录中,修改时也需要修改“/etc/init.d/domoticz.sh”
修改方法:
修改方法:
[code]sudo vi /etc/init.d/domoticz.sh[/code]
<code>sudo vi /etc/init.d/domoticz.sh</code>
修改完成后,需要重启Domoticz:
修改完成后,需要重启Domoticz:
[code]sudo service domoticz.sh restart[/code]
<code>sudo service domoticz.sh restart</code>
这时可能会提示“Warning: Unit file of domoticz.service changed on disk, 'systemctl daemon-reload' recommended.”
这时可能会提示“Warning: Unit file of domoticz.service changed on disk, 'systemctl daemon-reload' recommended.”
直接执行:[code]sudo systemctl daemon-reload[/code]
直接执行:<code]sudo systemctl daemon-reload</code>
然后在重启即可。
然后在重启即可。

2017年8月4日 (五) 15:27的版本

Domoticz的配置文件也是启动文件,默认文件路径:domoticz/domoticz.sh

默认文件内容如下:

DAEMON_ARGS="$DAEMON_ARGS -www 8080" DAEMON_ARGS="$DAEMON_ARGS -sslwww 443" 这两行分别是http与https的端口号设置。


<code]#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt" 此行用来设置Domoticz日志记录,要启用日志记录需要将行首的井号#删掉,“/tmp/domoticz.txt”是用来存放日志的文件。 以后Domoticz出现问题,直接查看此文件即可。


树莓派中,设置开机自动启动Domoticz时,此文件复制到了“/etc/init.d/”目录中,修改时也需要修改“/etc/init.d/domoticz.sh” 修改方法: sudo vi /etc/init.d/domoticz.sh 修改完成后,需要重启Domoticz: sudo service domoticz.sh restart 这时可能会提示“Warning: Unit file of domoticz.service changed on disk, 'systemctl daemon-reload' recommended.” 直接执行:<code]sudo systemctl daemon-reload 然后在重启即可。