Align default state file path with `tailscale` package.
When `tailscale.settings` doesn't exist in UCI, this LuCI App tries to
create one with settings parsed from the state file. The parser first
looks for `tailscale.settings.state_file` but this value sure wouldn't
exist under the circumstances and will fall back to default path.
Fix the default path for the parser to locate the state file properly.
Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
call: function() {
let settings = {};
uci.load('tailscale');
- let state_file_path = uci.get('tailscale', 'settings', 'state_file') || "/var/lib/tailscale/tailscaled.state";
+ let state_file_path = uci.get('tailscale', 'settings', 'state_file') || "/etc/tailscale/tailscaled.state";
if (access(state_file_path)) {
try {
let state_content = readfile(state_file_path);