local uci_cursor = uci.cursor(root_dir .. "/etc/config") local board local model = model or os_release["OPENWRT_DEVICE_PRODUCT"] or os_release["LEDE_DEVICE_PRODUCT"] if model:match('[Mm]ox') then board = "mox" elseif model:match('[Oo]mnia') then board = "omnia" elseif model:match('Turris 1.x') then board = "turris1x" else DIE("Unsupported board: " .. model) end local mode = uci_cursor:get("updater", "turris", "mode") local animal = uci_cursor:get("updater", "turris", "branch") if mode and mode ~= "branch" then WARN("Only branch mode allowed for personal-pkgs, used: " .. tostring(mode)) return end if animal ~= "hbd" and animal ~= "hbl" and animal ~= "hbk" then WARN("Unsupported branch for personal-pkgs: " .. tostring(animal)) return end Repository("personal-pkgs", animal .. "/" .. board) ---------------------------------------------------------------------------------- Install("personal-pkgs-repo") Package("personal-pkgs-repo", { replan = "finished" }) local tools = false local vpn = false local bigclown = false local sentinel = false uci_cursor:foreach("system", "system", function(s) hostname = s['hostname'] end) if hostname == "turris-prague" then tools = true vpn = true bigclown = true sentinel = true Install("6to4") Install("etherwake") elseif hostname == "turris-home" then tools = true vpn = true sentinel = true Install("transmission-daemon") elseif hostname:match("-home$") then tools = true elseif hostname == "turris-adamkovi" then tools = true vpn = true sentinel = true Install("etherwake") elseif hostname:match("^work-") then tools = true end if tools then Install("personal-enabler-common") Install("tree", "grep", "coreutils-sha256sum") Install("iperf", "iperf3") Install("sysstat", "strace") Install("shellrc") Install("mc", "htop", "iftop") Install("luci-theme-material") end if vpn then Install("luci-app-openvpn", "openvpn-openssl") Install("luci-app-wireguard", "wireguard") end if bigclown then Install("bigclown-gateway", "bigclown-mqtt2influxdb", "bigclown-control-tool") Install("mosquitto", "mosquitto-client") Install("bigclown-leds") end if sentinel then Install("personal-enabler-sentinel") end