luci-app-tailscale-community: fix default state file path
authorKuan-Yi Li <kyli@abysm.org>
Wed, 4 Feb 2026 11:36:34 +0000 (19:36 +0800)
committerPaul Donald <newtwen+github@gmail.com>
Fri, 6 Feb 2026 00:42:31 +0000 (01:42 +0100)
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>
applications/luci-app-tailscale-community/root/usr/share/rpcd/ucode/tailscale.uc

index 792f7c346a3ae8846e73f34fe4f534e48911faec..f1e987594989e2f9b67576ef4ac7c54e5580cbb4 100644 (file)
@@ -95,7 +95,7 @@ methods.get_settings = {
        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);