diff --git a/.github/workflows/flows.yml b/.github/workflows/node-red-pkg.yml similarity index 93% rename from .github/workflows/flows.yml rename to .github/workflows/node-red-pkg.yml index 657b4c0..544cb6f 100644 --- a/.github/workflows/flows.yml +++ b/.github/workflows/node-red-pkg.yml @@ -16,7 +16,7 @@ jobs: run: | mkdir -p .debpkg/home/node-red/.node-red ls -alR - cp stage5-common/00-install/files/AryaOS_flows.json .debpkg/home/node-red/.node-red/flows.json + cp shared_files/node_red/aryaos_flows.json .debpkg/home/node-red/.node-red/flows.json # create DEBIAN directory if you want to add other pre/post scripts mkdir -p .debpkg/DEBIAN echo -e "chown node-red:node-red /home/node-red/.node-red/flows.json" > .debpkg/DEBIAN/postinst diff --git a/.github/workflows/pi-gen.yml b/.github/workflows/pi-gen.yml new file mode 100644 index 0000000..9a960c8 --- /dev/null +++ b/.github/workflows/pi-gen.yml @@ -0,0 +1,28 @@ +name: Build pi-gen image + +on: + push: + tags: + - 'v*.*.*' + +jobs: + pi-gen-aryaos: + runs-on: ubuntu-latest + steps: + - name: dotenv + uses: falti/dotenv-action@v1.1.4 + with: + path: ./pi-gen/config + - uses: usimd/pi-gen-action@v1 + with: + # Disable the renaming of the first user during the first boot. This make it so + # 'username' stays activated. 'username' must be set for this to work. Please be + # aware of the implied security risk of defining a default username and password + # for your devices. + disable-first-boot-user-rename: 1 + + # Enable SSH access to Pi. + enable-ssh: 1 + + image-name: test + stage-list: stage0 stage1 stage2 ./test-stage \ No newline at end of file diff --git a/Makefile b/Makefile index a73ee25..38be07f 100644 --- a/Makefile +++ b/Makefile @@ -14,40 +14,6 @@ # -build: pi-gen - sudo ./build.sh - -pi-gen: - git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git - touch ./pi-gen/stage2/SKIP_IMAGES ./pi-gen/stage2/SKIP_NOOBS - -copy: - rsync -va ../aryaos kelp.local:~/src/SNS/ - # rsync -va ../aryaos titan2.local:~/src/SNS/ - -sync: copy - -skip: - touch pi-gen/stage0/SKIP - touch pi-gen/stage1/SKIP - touch pi-gen/stage2/SKIP - -unskip: - rm -f */SKIP - rm -f pi-gen/*/SKIP - -copyback: - scp pi-gen/deploy/image*.zip gba@rorqual.local:~ - -skip3: - touch stage3*/SKIP - -skip4: - touch stage4*/SKIP - -skip5: - touch stage5*/SKIP - mkdocs: pip install -r docs/requirements.txt mkdocs serve diff --git a/ansible/.vscode/settings.json b/ansible/.vscode/settings.json new file mode 100644 index 0000000..6d2b953 --- /dev/null +++ b/ansible/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "ansible.python.interpreterPath": "/Users/gba/.pyenv/versions/3.10.4/envs/ansible/bin/python" +} \ No newline at end of file diff --git a/ansible/Makefile b/ansible/Makefile new file mode 100644 index 0000000..e76bb4b --- /dev/null +++ b/ansible/Makefile @@ -0,0 +1,2 @@ +aryaaio: + ansible-playbook -i inventory.yml -e '@secret' site.yml -l aryaaio \ No newline at end of file diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..c4d0aad --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,1019 @@ +[defaults] +# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin) +# These warnings can be silenced by adjusting this setting to False. +;action_warnings=True + +# (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates. +;cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koala, meow, milk, moofasa, moose, ren, sheep, small, stegosaurus, stimpy, supermilker, three-eyes, turkey, turtle, tux, udder, vader-koala, vader, www + +# (string) Specify a custom cowsay path or swap in your cowsay implementation of choice +;cowpath= + +# (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them. +;cow_selection=default + +# (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True. +;force_color=False + +# (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information. +;nocolor=False + +# (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this. +;nocows=False + +# (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors. +;any_errors_fatal=False + +# (path) The password file to use for the become plugin. --become-password-file. +# If executable, it will be run and the resulting stdout will be used as the password. +;become_password_file= + +# (pathspec) Colon separated paths in which Ansible will search for Become Plugins. +;become_plugins=~/.ansible/plugins/become:/usr/share/ansible/plugins/become + +# (string) Chooses which cache plugin to use, the default 'memory' is ephemeral. +;fact_caching=memory + +# (string) Defines connection or path information for the cache plugin +;fact_caching_connection= + +# (string) Prefix to use for cache plugin files/tables +;fact_caching_prefix=ansible_facts + +# (integer) Expiration timeout for the cache plugin data +;fact_caching_timeout=86400 + +# (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activated by default. +;callbacks_enabled= + +# (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansible`). +;collections_on_ansible_version_mismatch=warning + +# (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if ``COLLECTIONS_PATHS`` includes ``~/.ansible/collections``, and you want to add ``my.collection`` to that directory, it must be saved as ``~/.ansible/collections/ansible_collections/my/collection``. + +;collections_path=~/.ansible/collections:/usr/share/ansible/collections + +# (boolean) A boolean to enable or disable scanning the sys.path for installed collections +;collections_scan_sys_path=True + +# (boolean) Ansible can issue a warning when the shell or command module is used and the command appears to be similar to an existing Ansible module. +# These warnings can be silenced by adjusting this setting to False. You can also control this at the task level with the module option ``warn``. +# As of version 2.11, this is disabled by default. +;command_warnings=False + +# (path) The password file to use for the connection plugin. --connection-password-file. +;connection_password_file= + +# (pathspec) Colon separated paths in which Ansible will search for Action Plugins. +;action_plugins=~/.ansible/plugins/action:/usr/share/ansible/plugins/action + +# (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) to return data that is not marked 'unsafe'. +# By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backward compatibility, however users should first consider adding allow_unsafe=True to any lookups which may be expected to contain data which may be run through the templating engine late +;allow_unsafe_lookups=False + +# (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not need to change this setting. +;ask_pass=False + +# (boolean) This controls whether an Ansible playbook should prompt for a vault password. +;ask_vault_pass=False + +# (pathspec) Colon separated paths in which Ansible will search for Cache Plugins. +;cache_plugins=~/.ansible/plugins/cache:/usr/share/ansible/plugins/cache + +# (pathspec) Colon separated paths in which Ansible will search for Callback Plugins. +;callback_plugins=~/.ansible/plugins/callback:/usr/share/ansible/plugins/callback + +# (pathspec) Colon separated paths in which Ansible will search for Cliconf Plugins. +;cliconf_plugins=~/.ansible/plugins/cliconf:/usr/share/ansible/plugins/cliconf + +# (pathspec) Colon separated paths in which Ansible will search for Connection Plugins. +;connection_plugins=~/.ansible/plugins/connection:/usr/share/ansible/plugins/connection + +# (boolean) Toggles debug output in Ansible. This is *very* verbose and can hinder multiprocessing. Debug output can also include secret information despite no_log settings being enabled, which means debug mode should not be used in production. +;debug=False + +# (string) This indicates the command to use to spawn a shell under for Ansible's execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is. +;executable=/bin/sh + +# (string) This option allows you to globally configure a custom path for 'local_facts' for the implied :ref:`ansible_collections.ansible.builtin.setup_module` task when using fact gathering. +# If not set, it will fallback to the default from the ``ansible.builtin.setup`` module: ``/etc/ansible/facts.d``. +# This does **not** affect user defined tasks that use the ``ansible.builtin.setup`` module. +# The real action being created by the implicit task is currently ``ansible.legacy.gather_facts`` module, which then calls the configured fact modules, by default this will be ``ansible.builtin.setup`` for POSIX systems but other platforms might have different defaults. +;fact_path= + +# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Filter Plugins. +;filter_plugins=~/.ansible/plugins/filter:/usr/share/ansible/plugins/filter + +# (boolean) This option controls if notified handlers run on a host even if a failure occurs on that host. +# When false, the handlers will not run if a failure has occurred on a host. +# This can also be set per play or on the command line. See Handlers and Failure for more details. +;force_handlers=False + +# (integer) Maximum number of forks Ansible will use to execute tasks on target hosts. +;forks=5 + +# (string) This setting controls the default policy of fact gathering (facts discovered about remote systems). +# This option can be useful for those wishing to save fact gathering time. Both 'smart' and 'explicit' will use the cache plugin. +;gathering=implicit + +# (list) Set the `gather_subset` option for the :ref:`ansible_collections.ansible.builtin.setup_module` task in the implicit fact gathering. See the module documentation for specifics. +# It does **not** apply to user defined ``ansible.builtin.setup`` tasks. +;gather_subset= + +# (integer) Set the timeout in seconds for the implicit fact gathering, see the module documentation for specifics. +# It does **not** apply to user defined :ref:`ansible_collections.ansible.builtin.setup_module` tasks. +;gather_timeout= + +# (string) This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible. +# This does not affect variables whose values are scalars (integers, strings) or arrays. +# **WARNING**, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don't change this setting unless you think you have an absolute need for it. +# We recommend avoiding reusing variable names and relying on the ``combine`` filter and ``vars`` and ``varnames`` lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays. +# For some uses you can also look into custom vars_plugins to merge on input, even substituting the default ``host_group_vars`` that is in charge of parsing the ``host_vars/`` and ``group_vars/`` directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder. +# All playbooks and roles in the official examples repos assume the default for this setting. +# Changing the setting to ``merge`` applies across variable sources, but many sources will internally still overwrite the variables. For example ``include_vars`` will dedupe variables internally before updating Ansible, with 'last defined' overwriting previous definitions in same file. +# The Ansible project recommends you **avoid ``merge`` for new projects.** +# It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid 'merge'**. +;hash_behaviour=replace + +# (pathlist) Comma separated list of Ansible inventory sources +;inventory=/etc/ansible/hosts + +# (pathspec) Colon separated paths in which Ansible will search for HttpApi Plugins. +;httpapi_plugins=~/.ansible/plugins/httpapi:/usr/share/ansible/plugins/httpapi + +# (float) This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern. +# The default corresponds to the value hardcoded in Ansible <= 2.1 +;internal_poll_interval=0.001 + +# (pathspec) Colon separated paths in which Ansible will search for Inventory Plugins. +;inventory_plugins=~/.ansible/plugins/inventory:/usr/share/ansible/plugins/inventory + +# (string) This is a developer-specific feature that allows enabling additional Jinja2 extensions. +# See the Jinja2 documentation for details. If you do not know what these do, you probably don't need to change this setting :) +;jinja2_extensions=[] + +# (boolean) This option preserves variable types during template operations. +;jinja2_native=False + +# (boolean) Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote. +# If this option is enabled it will disable ``ANSIBLE_PIPELINING``. +;keep_remote_files=False + +# (boolean) Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for ``ansible-playbook``. +;bin_ansible_callbacks=False + +# (tmppath) Temporary directory for Ansible to use on the controller. +;local_tmp=~/.ansible/tmp + +# (list) List of logger names to filter out of the log file +;log_filter= + +# (path) File to which Ansible will log on the controller. When empty logging is disabled. +;log_path= + +# (pathspec) Colon separated paths in which Ansible will search for Lookup Plugins. +;lookup_plugins=~/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup + +# (string) Sets the macro for the 'ansible_managed' variable available for :ref:`ansible_collections.ansible.builtin.template_module` and :ref:`ansible_collections.ansible.windows.win_template_module`. This is only relevant for those two modules. +;ansible_managed=Ansible managed + +# (string) This sets the default arguments to pass to the ``ansible`` adhoc binary if no ``-a`` is specified. +;module_args= + +# (string) Compression scheme to use when transferring Python modules to the target. +;module_compression=ZIP_DEFLATED + +# (string) Module to use with the ``ansible`` AdHoc command, if none is specified via ``-m``. +;module_name=command + +# (pathspec) Colon separated paths in which Ansible will search for Modules. +;library=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules + +# (pathspec) Colon separated paths in which Ansible will search for Module utils files, which are shared by modules. +;module_utils=~/.ansible/plugins/module_utils:/usr/share/ansible/plugins/module_utils + +# (pathspec) Colon separated paths in which Ansible will search for Netconf Plugins. +;netconf_plugins=~/.ansible/plugins/netconf:/usr/share/ansible/plugins/netconf + +# (boolean) Toggle Ansible's display and logging of task details, mainly used to avoid security disclosures. +;no_log=False + +# (boolean) Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log. +;no_target_syslog=False + +# (none) What templating should return as a 'null' value. When not set it will let Jinja2 decide. +;null_representation= + +# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed. +;poll_interval=15 + +# (path) Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying --private-key with every invocation. +;private_key_file= + +# (boolean) Makes role variables inaccessible from other roles. +# This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook. +;private_role_vars=False + +# (integer) Port to use in remote connections, when blank it will use the connection plugin default. +;remote_port= + +# (string) Sets the login user for the target machines +# When blank it uses the connection plugin's default, normally the user currently executing Ansible. +;remote_user= + +# (pathspec) Colon separated paths in which Ansible will search for Roles. +;roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles + +# (string) Set the main callback used to display Ansible output. You can only have one at a time. +# You can have many other callbacks, but just one can be in charge of stdout. +# See :ref:`callback_plugins` for a list of available options. +;stdout_callback=default + +# (string) Set the default strategy used for plays. +;strategy=linear + +# (pathspec) Colon separated paths in which Ansible will search for Strategy Plugins. +;strategy_plugins=~/.ansible/plugins/strategy:/usr/share/ansible/plugins/strategy + +# (boolean) Toggle the use of "su" for tasks. +;su=False + +# (string) Syslog facility to use when Ansible logs to the remote target +;syslog_facility=LOG_USER + +# (pathspec) Colon separated paths in which Ansible will search for Terminal Plugins. +;terminal_plugins=~/.ansible/plugins/terminal:/usr/share/ansible/plugins/terminal + +# (pathspec) Colon separated paths in which Ansible will search for Jinja2 Test Plugins. +;test_plugins=~/.ansible/plugins/test:/usr/share/ansible/plugins/test + +# (integer) This is the default timeout for connection plugins to use. +;timeout=10 + +# (string) Default connection plugin to use, the 'smart' option will toggle between 'ssh' and 'paramiko' depending on controller OS and ssh versions +;transport=smart + +# (boolean) When True, this causes ansible templating to fail steps that reference variable names that are likely typoed. +# Otherwise, any '{{ template_expression }}' that contains undefined variables will be rendered in a template or ansible action line exactly as written. +;error_on_undefined_vars=True + +# (pathspec) Colon separated paths in which Ansible will search for Vars Plugins. +;vars_plugins=~/.ansible/plugins/vars:/usr/share/ansible/plugins/vars + +# (string) The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The --encrypt-vault-id cli option overrides the configured value. +;vault_encrypt_identity= + +# (string) The label to use for the default vault id label in cases where a vault id label is not provided +;vault_identity=default + +# (list) A list of vault-ids to use by default. Equivalent to multiple --vault-id args. Vault-ids are tried in order. +;vault_identity_list= + +# (string) If true, decrypting vaults with a vault id will only try the password from the matching vault-id +;vault_id_match=False + +# (path) The vault password file to use. Equivalent to --vault-password-file or --vault-id +# If executable, it will be run and the resulting stdout will be used as the password. +vault_password_file=vault.txt + +# (integer) Sets the default verbosity, equivalent to the number of ``-v`` passed in the command line. +;verbosity=0 + +# (boolean) Toggle to control the showing of deprecation warnings +;deprecation_warnings=True + +# (boolean) Toggle to control showing warnings related to running devel +;devel_warning=True + +# (boolean) Normally ``ansible-playbook`` will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn't then ``ansible-playbook`` uses the task's action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then ``ansible-playbook`` will also include the task's arguments in the header. +# This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed. +# If you set this to True you should be sure that you have secured your environment's stdout (no one can shoulder surf your screen and you aren't saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the ``no_log: True`` parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information. +;display_args_to_stdout=False + +# (boolean) Toggle to control displaying skipped task/host entries in a task in the default callback +;display_skipped_hosts=True + +# (string) Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash. +;docsite_root_url=https://docs.ansible.com/ansible-core/ + +# (pathspec) Colon separated paths in which Ansible will search for Documentation Fragments Plugins. +;doc_fragment_plugins=~/.ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments + +# (string) By default Ansible will issue a warning when a duplicate dict key is encountered in YAML. +# These warnings can be silenced by adjusting this setting to False. +;duplicate_dict_key=warn + +# (boolean) Whether or not to enable the task debugger, this previously was done as a strategy plugin. +# Now all strategy plugins can inherit this behavior. The debugger defaults to activating when +# a task is failed on unreachable. Use the debugger keyword for more flexibility. +;enable_task_debugger=False + +# (boolean) Toggle to allow missing handlers to become a warning instead of an error when notifying. +;error_on_missing_handler=True + +# (list) Which modules to run during a play's fact gathering stage, using the default of 'smart' will try to figure it out based on connection type. +# If adding your own modules but you still want to use the default Ansible facts, you will want to include 'setup' or corresponding network module to the list (if you add 'smart', Ansible will also figure it out). +# This does not affect explicit calls to the 'setup' module, but does always affect the 'gather_facts' action (implicit or explicit). +;facts_modules=smart + +# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host +host_key_checking=False + +# (boolean) Facts are available inside the `ansible_facts` variable, this setting also pushes them as their own vars in the main namespace. +# Unlike inside the `ansible_facts` dictionary, these will have an `ansible_` prefix. +;inject_facts_as_vars=True + +# (string) Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are ``auto`` (the default), ``auto_silent``, ``auto_legacy``, and ``auto_legacy_silent``. All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting ``auto_silent`` or ``auto_legacy_silent``. The value of ``auto_legacy`` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to ``/usr/bin/python``, will use that interpreter if present. +;interpreter_python=auto + +# (boolean) If 'false', invalid attributes for a task will result in warnings instead of errors +;invalid_task_attribute_failed=True + +# (boolean) Toggle to control showing warnings related to running a Jinja version older than required for jinja2_native +;jinja2_native_warning=True + +# (boolean) By default Ansible will issue a warning when there are no hosts in the inventory. +# These warnings can be silenced by adjusting this setting to False. +;localhost_warning=True + +# (int) Maximum size of files to be considered for diff display +;max_diff_size=104448 + +# (list) List of extensions to ignore when looking for modules to load +# This is for rejecting script and binary module fallback extensions +;module_ignore_exts={{(REJECT_EXTS + ('.yaml', '.yml', '.ini'))}} + +# (list) TODO: write it +;network_group_modules=eos, nxos, ios, iosxr, junos, enos, ce, vyos, sros, dellos9, dellos10, dellos6, asa, aruba, aireos, bigip, ironware, onyx, netconf, exos, voss, slxos + +# (boolean) Previously Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in prevoius plays would be unexpectedly 'sticky'. This setting allows to return to that behaviour. +;old_plugin_cache_clear=False + +# (path) A number of non-playbook CLIs have a ``--playbook-dir`` argument; this sets the default value for it. +;playbook_dir= + +# (string) This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_vars +;playbook_vars_root=top + +# (path) A path to configuration for filtering which plugins installed on the system are allowed to be used. +# See :ref:`plugin_filtering_config` for details of the filter file's format. +# The default is /etc/ansible/plugin_filters.yml +;plugin_filters_cfg= + +# (string) Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https://bugs.python.org/issue11284). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits. +;python_module_rlimit_nofile=0 + +# (bool) This controls whether a failed Ansible playbook should create a .retry file. +;retry_files_enabled=False + +# (path) This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled. +# This file will be overwritten after each run with the list of failed hosts from all plays. +;retry_files_save_path= + +# (str) This setting can be used to optimize vars_plugin usage depending on user's inventory size and play selection. +;run_vars_plugins=demand + +# (bool) This adds the custom stats set via the set_stats plugin to the default output +;show_custom_stats=False + +# (string) Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as '1.00', "['a', 'b',]", and 'yes', 'y', etc. will be converted by the YAML parser unless fully quoted. +# Valid options are 'error', 'warn', and 'ignore'. +# Since 2.8, this option defaults to 'warn' but will change to 'error' in 2.12. +;string_conversion_action=warn + +# (boolean) Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts) +# These may include warnings about 3rd party packages or other conditions that should be resolved if possible. +;system_warnings=True + +# (boolean) This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified. +# True specifies that the debugger will honor ignore_errors, False will not honor ignore_errors. +;task_debugger_ignore_errors=True + +# (integer) Set the maximum time (in seconds) that a task can run for. +# If set to 0 (the default) there is no timeout. +;task_timeout=0 + +# (string) Make ansible transform invalid characters in group names supplied by inventory sources. +;force_valid_group_names=never + +# (boolean) Toggles the use of persistence for connections. +;use_persistent_connections=False + +# (bool) A toggle to disable validating a collection's 'metadata' entry for a module_defaults action group. Metadata containing unexpected fields or value types will produce a warning when this is True. +;validate_action_group_metadata=True + +# (list) Accept list for variable plugins that require it. +;vars_plugins_enabled=host_group_vars + +# (list) Allows to change the group variable precedence merge order. +;precedence=all_inventory, groups_inventory, all_plugins_inventory, all_plugins_play, groups_plugins_inventory, groups_plugins_play + +# (bool) Force 'verbose' option to use stderr instead of stdout +;verbose_to_stderr=False + +# (integer) For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load. +# This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here. +;win_async_startup_timeout=5 + +# (list) Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these. +# This affects vars_files, include_vars, inventory and vars plugins among others. +;yaml_valid_extensions=.yml, .yaml, .json + +# (string) User defined prefix to use when creating the JSON files +;fact_caching_prefix= + +# (integer) Expiration timeout for the cache plugin data +;fact_caching_timeout=86400 + +# (path) Path in which the cache plugin will save the JSON files +;fact_caching_connection= + +# (bool) Toggle to control displaying markers when running in check mode. +# The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check)) and C(CHECK MODE) as a suffix at every play and task that is run in check mode. +;check_mode_markers=False + +# (bool) Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT) +;display_failed_stderr=False + +# (bool) Toggle to control displaying 'ok' task/host results in a task +;display_ok_hosts=True + +# (bool) Toggle to control displaying skipped task/host results in a task +;display_skipped_hosts=True + +# (bool) Configure the result format to be more readable +# When the result format is set to C(yaml) this option defaults to C(True), and defaults to C(False) when configured to C(json). +# Setting this option to C(True) will force C(json) and C(yaml) results to always be pretty printed regardless of verbosity. +# When set to C(True) and used with the C(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to C(False) or set the result format to C(json). +;callback_format_pretty= + +# (str) Define the task result format used in the callback output. +# These formats do not cause the callback to emit valid JSON or YAML formats. +# The output contains these formats interspersed with other non-machine parsable data. +;callback_result_format=json + +# (bool) This adds the custom stats set via the set_stats plugin to the play recap +;show_custom_stats=False + +# (bool) This adds output that shows when a task is started to execute for each host +;show_per_host_start=False + +# (bool) When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with C(-vv) or greater verbosity. +;show_task_path_on_failure=False + +# (bool) Configure the result format to be more readable +# When the result format is set to C(yaml) this option defaults to C(True), and defaults to C(False) when configured to C(json). +# Setting this option to C(True) will force C(json) and C(yaml) results to always be pretty printed regardless of verbosity. +# When set to C(True) and used with the C(yaml) result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to C(False) or set the result format to C(json). +;callback_format_pretty= + +# (str) Define the task result format used in the callback output. +# These formats do not cause the callback to emit valid JSON or YAML formats. +# The output contains these formats interspersed with other non-machine parsable data. +;callback_result_format=json + +# (boolean) Toggles the use of persistence for connections +;use_persistent_connections=False + +# (int) Remote port to connect to. +;remote_port= + +# (string) Path to private key file to use for authentication. +private_key_file=/Users/gba/.ssh/ansible_id_ed25519 + +# (string) User name with which to login to the remote server, normally set by the remote_user keyword. +# If no user is supplied, Ansible will let the SSH client binary choose the user as it normally. +remote_user=ansible + +# (list) list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user. +;admin_users=root, toor + +# (string) Directory in which ansible will keep async job information +;async_dir=~/.ansible_async + +# (string) Checked when Ansible needs to execute a module as a different user. +# If setfacl and chown both fail and do not let the different user access the module's files, they will be chgrp'd to this group. +# In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group. +;common_remote_group= + +# (string) Temporary directory to use on targets when executing tasks. +;remote_tmp=~/.ansible/tmp + +# (list) List of valid system temporary directories on the managed machine for Ansible to validate C(remote_tmp) against, when specific permissions are needed. These must be world readable, writable, and executable. This list should only contain directories which the system administrator has pre-created with the proper ownership and permissions otherwise security issues can arise. +# When C(remote_tmp) is required to be a system temp dir and it does not match any in the list, the first one from the list will be used instead. +;system_tmpdirs=/var/tmp, /tmp + +# (boolean) This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task. +# It is useful when becoming an unprivileged user. +;allow_world_readable_tmpfiles=False + +# (list) Check all of these extensions when looking for 'variable' files which should be YAML or JSON or vaulted versions of these. +# This affects vars_files, include_vars, inventory and vars plugins among others. +;yaml_valid_extensions=.yml, .yaml, .json + + +[privilege_escalation] +# (boolean) Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method +;agnostic_become_prompt=True + +# (boolean) This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root. +# If executable, it will be run and the resulting stdout will be used as the password. +;become_allow_same_user=False + +# (boolean) Toggles the use of privilege escalation, allowing you to 'become' another user after login. +;become=False + +# (boolean) Toggle to prompt for privilege escalation password. +;become_ask_pass=False + +# (string) executable to use for privilege escalation, otherwise Ansible will depend on PATH +;become_exe= + +# (string) Flags to pass to the privilege escalation executable. +;become_flags= + +# (string) Privilege escalation method to use when `become` is enabled. +;become_method=sudo + +# (string) The user your login/remote user 'becomes' when using privilege escalation, most systems will use 'root' when no user is specified. +;become_user=root + + +[persistent_connection] +# (path) Specify where to look for the ansible-connection script. This location will be checked before searching $PATH. +# If null, ansible will start with the same directory as the ansible script. +;ansible_connection_path= + +# (int) This controls the amount of time to wait for response from remote device before timing out persistent connection. +;command_timeout=30 + +# (integer) This controls the retry timeout for persistent connection to connect to the local domain socket. +;connect_retry_timeout=15 + +# (integer) This controls how long the persistent connection will remain idle before it is destroyed. +;connect_timeout=30 + +# (path) Path to socket to be used by the connection persistence system. +;control_path_dir=~/.ansible/pc + + +[connection] +# (boolean) This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all. +# Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer. +# It can result in a very significant performance improvement when enabled. +# However this conflicts with privilege escalation (become). For example, when using 'sudo:' operations you must first disable 'requiretty' in /etc/sudoers on all managed hosts, which is why it is disabled by default. +# This setting will be disabled if ``ANSIBLE_KEEP_REMOTE_FILES`` is enabled. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + + +[colors] +# (string) Defines the color to use on 'Changed' task status +;changed=yellow + +# (string) Defines the default color to use for ansible-console +;console_prompt=white + +# (string) Defines the color to use when emitting debug messages +;debug=dark gray + +# (string) Defines the color to use when emitting deprecation messages +;deprecate=purple + +# (string) Defines the color to use when showing added lines in diffs +;diff_add=green + +# (string) Defines the color to use when showing diffs +;diff_lines=cyan + +# (string) Defines the color to use when showing removed lines in diffs +;diff_remove=red + +# (string) Defines the color to use when emitting error messages +;error=red + +# (string) Defines the color to use for highlighting +;highlight=white + +# (string) Defines the color to use when showing 'OK' task status +;ok=green + +# (string) Defines the color to use when showing 'Skipped' task status +;skip=cyan + +# (string) Defines the color to use on 'Unreachable' status +;unreachable=bright red + +# (string) Defines the color to use when emitting verbose messages. i.e those that show with '-v's. +;verbose=blue + +# (string) Defines the color to use when emitting warning messages +;warn=bright purple + + +[selinux] +# (boolean) This setting causes libvirt to connect to lxc containers by passing --noseclabel to virsh. This is necessary when running on systems which do not have SELinux. +;libvirt_lxc_noseclabel=False + +# (list) Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible 'tolerate' those in the list w/o causing fatal errors. +# Data corruption may occur and writes are not always verified when a filesystem is in the list. +;special_context_filesystems=fuse, nfs, vboxsf, ramfs, 9p, vfat + + +[diff] +# (bool) Configuration toggle to tell modules to show differences when in 'changed' status, equivalent to ``--diff``. +;always=False + +# (integer) How many lines of context to show when displaying the differences between files. +;context=3 + + +[galaxy] +# (path) The directory that stores cached responses from a Galaxy server. +# This is only used by the ``ansible-galaxy collection install`` and ``download`` commands. +# Cache files inside this dir will be ignored if they are world writable. +;cache_dir=~/.ansible/galaxy_cache + +# (path) Collection skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy collection``, same as ``--collection-skeleton``. +;collection_skeleton= + +# (list) patterns of files to ignore inside a Galaxy collection skeleton directory +;collection_skeleton_ignore=^.git$, ^.*/.git_keep$ + +# (bool) Disable GPG signature verification during collection installation. +;disable_gpg_verify=False + +# (bool) Some steps in ``ansible-galaxy`` display a progress wheel which can cause issues on certain displays or when outputing the stdout to a file. +# This config option controls whether the display wheel is shown or not. +# The default is to show the display wheel if stdout has a tty. +;display_progress= + +# (path) Configure the keyring used for GPG signature verification during collection installation and verification. +;gpg_keyring= + +# (boolean) If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate. +;ignore_certs=False + +# (list) A list of GPG status codes to ignore during GPG signature verfication. See L(https://github.com/gpg/gnupg/blob/master/doc/DETAILS#general-status-codes) for status code descriptions. +# If fewer signatures successfully verify the collection than `GALAXY_REQUIRED_VALID_SIGNATURE_COUNT`, signature verification will fail even if all error codes are ignored. +;ignore_signature_status_codes= + +# (str) The number of signatures that must be successful during GPG signature verification while installing or verifying collections. +# This should be a positive integer or all to indicate all signatures must successfully validate the collection. +# Prepend + to the value to fail if no valid signatures are found for the collection. +;required_valid_signature_count=1 + +# (path) Role skeleton directory to use as a template for the ``init`` action in ``ansible-galaxy``/``ansible-galaxy role``, same as ``--role-skeleton``. +;role_skeleton= + +# (list) patterns of files to ignore inside a Galaxy role or collection skeleton directory +;role_skeleton_ignore=^.git$, ^.*/.git_keep$ + +# (string) URL to prepend when roles don't specify the full URI, assume they are referencing this server as the source. +;server=https://galaxy.ansible.com + +# (list) A list of Galaxy servers to use when installing a collection. +# The value corresponds to the config ini header ``[galaxy_server.{{item}}]`` which defines the server details. +# See :ref:`galaxy_server_config` for more details on how to define a Galaxy server. +# The order of servers in this list is used to as the order in which a collection is resolved. +# Setting this config option will ignore the :ref:`galaxy_server` config option. +;server_list= + +# (path) Local path to galaxy access token file +;token_path=~/.ansible/galaxy_token + + +[inventory] +# (string) This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it +;host_pattern_mismatch=warning + +# (boolean) If 'true', it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning. + +;any_unparsed_is_failed=False + +# (bool) Toggle to turn on inventory caching. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration. +# This message will be removed in 2.16. +;cache=False + +# (string) The plugin for caching inventory. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_plugin= + +# (string) The inventory cache connection. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_connection= + +# (string) The table prefix for the cache plugin. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_prefix=ansible_inventory_ + +# (string) Expiration timeout for the inventory cache plugin data. +# This setting has been moved to the individual inventory plugins as a plugin option :ref:`inventory_plugins`. +# The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. +# This message will be removed in 2.16. +;cache_timeout=3600 + +# (list) List of enabled inventory plugins, it also determines the order in which they are used. +;enable_plugins=host_list, script, auto, yaml, ini, toml + +# (bool) Controls if ansible-inventory will accurately reflect Ansible's view into inventory or its optimized for exporting. +;export=False + +# (list) List of extensions to ignore when using a directory as an inventory source +;ignore_extensions={{(REJECT_EXTS + ('.orig', '.ini', '.cfg', '.retry'))}} + +# (list) List of patterns to ignore when using a directory as an inventory source +;ignore_patterns= + +# (bool) If 'true' it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning. + +;unparsed_is_failed=False + + +[netconf_connection] +# (string) This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings. +;ssh_config= + + +[paramiko_connection] +# (boolean) TODO: write it +;host_key_auto_add=False + +# (boolean) TODO: write it +;look_for_keys=True + +# (boolean) Automatically add host keys +;host_key_auto_add= + +# (boolean) Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host +;host_key_checking=True + +# (boolean) False to disable searching for private key files in ~/.ssh/ +;look_for_keys=True + +# (string) Proxy information for running the connection via a jumphost +# Also this plugin will scan 'ssh_args', 'ssh_extra_args' and 'ssh_common_args' from the 'ssh' plugin settings for proxy information if set. +;proxy_command= + +# (boolean) SUDO usually requires a PTY, True to give a PTY and False to not give a PTY. +;pty=True + +# (boolean) Save the host keys to a file +;record_host_keys=True + +# (string) User to login/authenticate as +# Can be set from the CLI via the C(--user) or C(-u) options. +;remote_user= + + +[jinja2] +# (list) This list of filters avoids 'type conversion' when templating variables +# Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example. +;dont_type_filters=string, to_json, to_nice_json, to_yaml, to_nice_yaml, ppretty, json + + +[tags] +# (list) default list of tags to run in your plays, Skip Tags has precedence. +;run= + +# (list) default list of tags to skip in your plays, has precedence over Run Tags +;skip= + + +[runas_become_plugin] +# (string) Options to pass to runas, a space delimited list of k=v pairs +;flags= + +# (string) password +;password= + +# (string) User you 'become' to execute the task +;user= + + +[su_become_plugin] +# (string) Su executable +;executable=su + +# (string) Options to pass to su +;flags= + +# (string) Password to pass to su +;password= + +# (string) User you 'become' to execute the task +;user=root + +# (list) List of localized strings to match for prompt detection +# If empty we'll use the built in one +# Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a "Timeout" error. +;localized_prompts= + + +[sudo_become_plugin] +# (string) Sudo executable +;executable=sudo + +# (string) Options to pass to sudo +;flags=-H -S -n + +# (string) Password to pass to sudo +;password= + +# (string) User you 'become' to execute the task +;user=root + + +[callback_tree] +# (path) directory that will contain the per host JSON files. Also set by the C(--tree) option when using adhoc. +;directory=~/.ansible/tree + + +[ssh_connection] +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_args= + +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_common_args= + +# (string) Only used in parsing ProxyCommand for use in this plugin. +;ssh_extra_args= + +# (string) This is the location to save SSH's ControlPath sockets, it uses SSH's variable substitution. +# Since 2.3, if null (default), ansible will generate a unique hash. Use ``%(directory)s`` to indicate where to use the control dir path setting. +# Before 2.3 it defaulted to ``control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r``. +# Be aware that this setting is ignored if C(-o ControlPath) is set in ssh args. +;control_path= + +# (string) This sets the directory to use for ssh control path if the control path setting is null. +# Also, provides the ``%(directory)s`` variable for the control path setting. +;control_path_dir=~/.ansible/cp + +# (boolean) Determines if SSH should check host keys. +;host_key_checking=True + +# (boolean) Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers. +# This can result in a very significant performance improvement when enabled. +# However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. +;pipelining=False + +# (string) PKCS11 SmartCard provider such as opensc, example: /usr/local/lib/opensc-pkcs11.so +# Requires sshpass version 1.06+, sshpass must support the -P option. +;pkcs11_provider= + +# (integer) Number of attempts to connect. +# Ansible retries connections only if it gets an SSH error with a return code of 255. +# Any errors with return codes other than 255 indicate an issue with program execution. +;retries=0 + +# (string) This defines the location of the scp binary. It defaults to C(scp) which will use the first binary available in $PATH. +;scp_executable=scp + +# (string) Extra exclusive to the C(scp) CLI +;scp_extra_args= + +# (string) Preferred method to use when transferring files over SSH. +# When set to I(smart), Ansible will try them until one succeeds or they all fail. +# If set to I(True), it will force 'scp', if I(False) it will use 'sftp'. +# For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args="-O") +# This setting will overridden by ssh_transfer_method if set. +;scp_if_ssh=smart + +# (bool) TODO: write it +;sftp_batch_mode=yes + +# (string) This defines the location of the sftp binary. It defaults to C(sftp) which will use the first binary available in $PATH. +;sftp_executable=sftp + +# (string) Extra exclusive to the C(sftp) CLI +;sftp_extra_args= + +# (string) Arguments to pass to all SSH CLI tools. +;ssh_args=-C -o ControlMaster=auto -o ControlPersist=60s + +# (string) Common extra args for all SSH CLI tools. +;ssh_common_args= + +# (string) This defines the location of the SSH binary. It defaults to C(ssh) which will use the first SSH binary available in $PATH. +# This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts. +;ssh_executable=ssh + +# (string) Extra exclusive to the SSH CLI. +;ssh_extra_args= + +# (string) Preferred method to use when transferring files over ssh +# Setting to 'smart' (default) will try them in order, until one succeeds or they all fail +# For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args="-O") +# Using 'piped' creates an ssh pipe with C(dd) on either side to copy the data +;transfer_method= + +# (string) Password prompt that sshpass should search for. Supported by sshpass 1.06 and up. +# Defaults to C(Enter PIN for) when pkcs11_provider is set. +;sshpass_prompt= + +# (integer) This is the default amount of time we will wait while establishing an SSH connection. +# It also controls how long we can wait to access reading the connection once established (select on the socket). +;timeout=10 + +# (bool) add -tt to ssh commands to force tty allocation. +;usetty=yes + + +[winrm] +# (list) A list of environment variables to pass through to C(kinit) when getting the Kerberos authentication ticket. +# By default no environment variables are passed through and C(kinit) is run with a blank slate. +# The environment variable C(KRB5CCNAME) cannot be specified here as it's used to store the temp Kerberos ticket used by WinRM. +;kinit_env_vars= + + +[inventory_plugins] +# (bool) Merge extra vars into the available variables for composition (highest precedence). +;use_extra_vars=False + + +[inventory_plugin_script] +# (boolean) Toggle display of stderr even when script was successful +;always_show_stderr=True + + +[inventory_plugin_yaml] +# (list) list of 'valid' extensions for files containing YAML +;yaml_valid_extensions=.yaml, .yml, .json + + +[url_lookup] +# (string) String of file system path to CA cert bundle to use +;ca_path= + +# (string) String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information +;follow_redirects=urllib2 + +# (boolean) Whether or not to set "cache-control" header with value "no-cache" +;force=False + +# (boolean) Force basic authentication +;agent=False + +# (string) User-Agent to use in the request. The default was changed in 2.11 to C(ansible-httpget). +;agent=ansible-httpget + +# (float) How long to wait for the server to send data before giving up +;timeout=10 + +# (string) String of file system path to unix socket file to use when establishing connection to the provided url +;unix_socket= + +# (list) A list of headers to not attach on a redirected request +;unredirected_headers= + +# (boolean) Use GSSAPI handler of requests +# As of Ansible 2.11, GSSAPI credentials can be specified with I(username) and I(password). +;use_gssapi=False + + +[powershell] +# (string) Directory in which ansible will keep async job information. +# Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async"). +;async_dir=%USERPROFILE%\.ansible_async + +# (string) Temporary directory to use on targets when copying files to the host. +;remote_tmp=%TEMP% + +# (string) Directory in which ansible will keep async job information. +# Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async"). +;async_dir=%USERPROFILE%\.ansible_async + +# (string) Temporary directory to use on targets when copying files to the host. +;remote_tmp=%TEMP% + + +[vars_host_group_vars] +# (str) Control when this vars plugin may be executed. +# Setting this option to C(all) will run the vars plugin after importing inventory and whenever it is demanded by a task. +# Setting this option to C(task) will only run the vars plugin whenever it is demanded by a task. +# Setting this option to C(inventory) will only run the vars plugin after parsing inventory. +# If this option is omitted, the global I(RUN_VARS_PLUGINS) configuration is used to determine when to execute the vars plugin. +;stage= + diff --git a/stage9-docker/00-prepare/01-run-chroot.sh b/ansible/inventory.yml old mode 100755 new mode 100644 similarity index 68% rename from stage9-docker/00-prepare/01-run-chroot.sh rename to ansible/inventory.yml index a7f0ec0..dd78118 --- a/stage9-docker/00-prepare/01-run-chroot.sh +++ b/ansible/inventory.yml @@ -1,11 +1,11 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh # -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -14,4 +14,7 @@ # limitations under the License. # -apt update \ No newline at end of file +all: + hosts: + aryaaio: + ansible_host: 172.17.2.204 diff --git a/stage3-base/00-install/files/AryaOS-config.txt b/ansible/playbook.yaml similarity index 50% rename from stage3-base/00-install/files/AryaOS-config.txt rename to ansible/playbook.yaml index 505e2ba..a9280a7 100644 --- a/stage3-base/00-install/files/AryaOS-config.txt +++ b/ansible/playbook.yaml @@ -1,12 +1,11 @@ -# AryaOS AryaOS-config.txt # -# AryaOS Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,8 +14,16 @@ # limitations under the License. # -COT_URL=udp+wo://239.2.3.1:6969 -PYTAK_MULTICAST_LOCAL_ADDR=10.41.0.1 -WIFI_AP_IP=10.41.0.1 -NODE_ID="" -AOS_SERVICES="ADSBCOT LINCOT AISCOT DroneCOT nodered readsb" +- name: First Playbook + hosts: all + tasks: + - name: Ping my hosts + ansible.builtin.ping: + - name: Print message + ansible.builtin.debug: + msg: Hello world + - name: Disk usage from command module + command: df -h + register: space + - debug: + var: space.stdout_lines diff --git a/stage8-uas/00-install/files/DroneCOT-config.txt b/ansible/roles/adsbcot/handlers/main.yml similarity index 56% rename from stage8-uas/00-install/files/DroneCOT-config.txt rename to ansible/roles/adsbcot/handlers/main.yml index 7830a35..3eb4a7b 100644 --- a/stage8-uas/00-install/files/DroneCOT-config.txt +++ b/ansible/roles/adsbcot/handlers/main.yml @@ -1,12 +1,12 @@ -# AryaOS DroneCOT-config.txt +# code: language=ansible # -# DroneCOT Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,3 +15,12 @@ # limitations under the License. # +- name: Restart ADSBCOT + ansible.builtin.service: + name: adsbcot + state: restarted + +- name: Restart READSB + ansible.builtin.service: + name: readsb + state: restarted diff --git a/ansible/roles/adsbcot/tasks/adsbcot.yml b/ansible/roles/adsbcot/tasks/adsbcot.yml new file mode 100644 index 0000000..43a8e68 --- /dev/null +++ b/ansible/roles/adsbcot/tasks/adsbcot.yml @@ -0,0 +1,34 @@ +# code: language=ansible +# adsbcot.yml - Install ADSBCOT. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Download ADSBCOT Debian package + ansible.builtin.get_url: + url: "{{ adsbcot_deb_url }}" + dest: /usr/src/{{ adsbcot_deb }} + mode: "0644" + +- name: Install ADSBCOT Debian package + ansible.builtin.apt: + deb: /usr/src/{{ adsbcot_deb }} + +- name: Update ADSBCOT FEED_URL + ansible.builtin.replace: + path: /etc/default/adsbcot + regexp: '^.*FEED_URL=.*$' + replace: 'FEED_URL=file:///run/readsb/aircraft.json' + notify: Restart ADSBCOT diff --git a/stage8-uas/EXPORT_IMAGE b/ansible/roles/adsbcot/tasks/main.yml similarity index 60% rename from stage8-uas/EXPORT_IMAGE rename to ansible/roles/adsbcot/tasks/main.yml index c1cbc40..bb4c421 100644 --- a/stage8-uas/EXPORT_IMAGE +++ b/ansible/roles/adsbcot/tasks/main.yml @@ -1,12 +1,12 @@ -# AryaOS EXPORT_IMAGE +# code: language=ansible # -# Export image configuration for AryaOS -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,8 +15,8 @@ # limitations under the License. # -IMG_SUFFIX="-build" +- name: Include adsbcot + ansible.builtin.include_tasks: adsbcot.yml -if [ "${USE_QEMU}" = "1" ]; then - export IMG_SUFFIX="${IMG_SUFFIX}-qemu" -fi +- name: Include readsb + ansible.builtin.include_tasks: readsb.yml diff --git a/ansible/roles/adsbcot/tasks/readsb.yml b/ansible/roles/adsbcot/tasks/readsb.yml new file mode 100644 index 0000000..5c4b3e7 --- /dev/null +++ b/ansible/roles/adsbcot/tasks/readsb.yml @@ -0,0 +1,34 @@ +# code: language=ansible +# readsb.yml - Install READSB. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Download READSB Debian package + ansible.builtin.get_url: + url: "{{ readsb_deb_url }}" + dest: /usr/src/{{ readsb_deb }} + mode: "0644" + +- name: Install READSB Debian package + ansible.builtin.apt: + deb: /usr/src/{{ readsb_deb }} + +- name: Set SDR S/N in READSB config + ansible.builtin.replace: + path: /etc/default/readsb + regexp: '^RECEIVER_OPTIONS.*$' + replace: 'RECEIVER_OPTIONS="--device {{ adsb_sdr_sn }} --device-type rtlsdr --gain -10 --ppm 0"' + notify: Restart READSB diff --git a/ansible/roles/aiscot/tasks/ais-catcher.yml b/ansible/roles/aiscot/tasks/ais-catcher.yml new file mode 100644 index 0000000..03c9f14 --- /dev/null +++ b/ansible/roles/aiscot/tasks/ais-catcher.yml @@ -0,0 +1,65 @@ +# code: language=ansible +# ais-catcher.yml - Build & Install AIS-catcher. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Extract AIS-catcher source + ansible.builtin.unarchive: + src: "{{ shared_files }}/ais/AIS-catcher-main.zip" + dest: /usr/src + creates: /usr/src/AIS-catcher-main + +- name: Create AIS-catcher build directory + ansible.builtin.file: + path: /usr/src/AIS-catcher-main/build + state: directory + mode: "0755" + +- name: Build AIS-catcher + ansible.builtin.shell: + cmd: | + cmake .. + make + make install + creates: /usr/local/bin/AIS-catcher + chdir: /usr/src/AIS-catcher-main/build + +- name: Copy AIS-catcher systemd config + ansible.builtin.copy: + src: "{{ shared_files }}/ais/AIS-catcher.service" + dest: /lib/systemd/system/ais-catcher.service + mode: "0644" + +- name: Copy AIS-catcher default config + ansible.builtin.copy: + src: ../../AIS-catcher.default.conf + dest: /etc/default/ais-catcher + mode: "0644" + +- name: Add ais-catcher to dialout (USB access) + ansible.builtin.user: + name: aiscatcher + groups: dialout + comment: ais-catcher system user + append: true + system: true + create_home: false + +- name: Enable AIS-catcher service + ansible.builtin.systemd_service: + name: ais-catcher.service + enabled: true + daemon_reload: true diff --git a/stage7-sea/00-install/files/run_AISCOT.sh b/ansible/roles/aiscot/tasks/aiscot.yml old mode 100755 new mode 100644 similarity index 50% rename from stage7-sea/00-install/files/run_AISCOT.sh rename to ansible/roles/aiscot/tasks/aiscot.yml index beed16c..7285fbf --- a/stage7-sea/00-install/files/run_AISCOT.sh +++ b/ansible/roles/aiscot/tasks/aiscot.yml @@ -1,13 +1,13 @@ -#!/bin/bash -# AryaOS run_AISCOT.sh +# code: language=ansible +# aiscot.yml - Install AISCOT. # -# Startup file for AISCOT. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -16,17 +16,13 @@ # limitations under the License. # -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" -AISCOT_CONFIG="/boot/AISCOT-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -fi -if [ -f $AISCOT_CONFIG ]; then - . $AISCOT_CONFIG -fi +- name: Download AISCOT Debian package + ansible.builtin.get_url: + url: "{{ aiscot_deb_url }}" + dest: /usr/src/{{ aiscot_deb }} + mode: "0644" -set +a -/usr/local/bin/aiscot +- name: Install AISCOT Debian package + ansible.builtin.apt: + deb: /usr/src/{{ aiscot_deb }} diff --git a/stage9-docker/EXPORT_IMAGE b/ansible/roles/aiscot/tasks/main.yml similarity index 58% rename from stage9-docker/EXPORT_IMAGE rename to ansible/roles/aiscot/tasks/main.yml index c1cbc40..cbf2b22 100644 --- a/stage9-docker/EXPORT_IMAGE +++ b/ansible/roles/aiscot/tasks/main.yml @@ -1,12 +1,13 @@ -# AryaOS EXPORT_IMAGE +# code: language=ansible +# main.yml - Install AISCOT & dependencies. # -# Export image configuration for AryaOS -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,8 +16,8 @@ # limitations under the License. # -IMG_SUFFIX="-build" +- name: Include AISCOT + include_tasks: aiscot.yml -if [ "${USE_QEMU}" = "1" ]; then - export IMG_SUFFIX="${IMG_SUFFIX}-qemu" -fi +- name: Include AIS-Catcher + include_tasks: ais-catcher.yml diff --git a/ansible/roles/aryaos/handlers/main.yml b/ansible/roles/aryaos/handlers/main.yml new file mode 100644 index 0000000..ddb14a4 --- /dev/null +++ b/ansible/roles/aryaos/handlers/main.yml @@ -0,0 +1,21 @@ +# code: language=ansible + +- name: Restart lighttpd + ansible.builtin.service: + name: lighttpd + state: restarted + +- name: Restart tar1090 + ansible.builtin.service: + name: tar1090 + state: restarted + +- name: Restart dump1090-fa + ansible.builtin.service: + name: dump1090-fa + state: restarted + +- name: Restart dump978-fa + ansible.builtin.service: + name: dump978-fa + state: restarted \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/ADSBCOT-config.txt b/ansible/roles/aryaos/tasks/common.yml similarity index 59% rename from stage6-air/04-aryaair/files/ADSBCOT-config.txt rename to ansible/roles/aryaos/tasks/common.yml index 95fc4cf..96866ab 100644 --- a/stage6-air/04-aryaair/files/ADSBCOT-config.txt +++ b/ansible/roles/aryaos/tasks/common.yml @@ -1,12 +1,12 @@ -# AryaOS ADSBCOT-config.txt +# code: language=ansible # -# ADSBCOT Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,5 +15,8 @@ # limitations under the License. # -FEED_URL=file:///run/adsb/aircraft.json -TFR_STATE=CA +- name: Copy sudoers + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/aryaos.sudoers" + dest: /etc/sudoers.d/aryaos + mode: "0640" diff --git a/ansible/roles/aryaos/tasks/dump978.yml b/ansible/roles/aryaos/tasks/dump978.yml new file mode 100644 index 0000000..f12457a --- /dev/null +++ b/ansible/roles/aryaos/tasks/dump978.yml @@ -0,0 +1,51 @@ +# code: language=ansible +# dump978.yml +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Extract dump978 source + ansible.builtin.unarchive: + src: "{{ shared_files }}/aryaos/dump978-master.zip" + dest: /usr/src + creates: /usr/src/dump978-master + +- name: Build dump978 + ansible.builtin.command: + cmd: dpkg-buildpackage -b --no-sign + chdir: /usr/src/dump978-master + creates: /usr/src/dump978-fa_9.0_amd64.deb + +- name: Install dump978-fa Debian package + ansible.builtin.apt: + deb: /usr/src/dump978-fa_9.0_amd64.deb + +- name: Install skyaware978 Debian package + ansible.builtin.apt: + deb: /usr/src/skyaware978_9.0_amd64.deb + +- name: Set SDR S/N in dump978-fa config + ansible.builtin.replace: + path: /etc/default/dump978-fa + regexp: 'driver=rtlsdr\s' + replace: 'driver=rtlsdr,serial={{ uat_sdr_sn }} ' + notify: Restart dump978-fa + +- name: Enable 978 in tar1090 + ansible.builtin.replace: + path: /etc/default/tar1090 + regexp: '^ENABLE_978=no' + replace: 'ENABLE_978=yes' + notify: Restart tar1090 diff --git a/ansible/roles/aryaos/tasks/fa.yml b/ansible/roles/aryaos/tasks/fa.yml new file mode 100644 index 0000000..a8c9ed4 --- /dev/null +++ b/ansible/roles/aryaos/tasks/fa.yml @@ -0,0 +1,31 @@ +# code: language=ansible +# fa.yml +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Copy flightaware-apt-repository Debian package + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/flightaware-apt-repository_1.2_all.deb" + dest: /usr/src/flightaware-apt-repository_1.2_all.deb + mode: "0644" + +- name: Install flightaware-apt-repository Debian package + ansible.builtin.apt: + deb: /usr/src/flightaware-apt-repository_1.2_all.deb + +- name: Run the equivalent of "apt-get update" as a separate step + ansible.builtin.apt: + update_cache: true diff --git a/ansible/roles/aryaos/tasks/main.yml b/ansible/roles/aryaos/tasks/main.yml new file mode 100644 index 0000000..f01e747 --- /dev/null +++ b/ansible/roles/aryaos/tasks/main.yml @@ -0,0 +1,75 @@ +# code: language=ansible +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Include pytak + ansible.builtin.include_tasks: pytak.yml + +- name: Include recorder + ansible.builtin.include_tasks: recorder.yml + +- name: Include tar1090 + ansible.builtin.include_tasks: fa.yml + +- name: Include fa + ansible.builtin.include_tasks: fa.yml + +- name: Include dump978 + ansible.builtin.include_tasks: dump978.yml + +- name: Include portal + ansible.builtin.include_tasks: portal.yml + +- name: Include WiFi + ansible.builtin.include_tasks: wifi.yml + +- name: Include common + ansible.builtin.include_tasks: common.yml + +- name: Upload UUID util script + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/set_uuid.sh" + dest: /usr/local/sbin + mode: "0755" + +- name: Set UUID util service + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/set_uuid.service" + dest: /lib/systemd/system + mode: "0644" + +- name: Upload AryaOS Config + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/aryaos-config.txt" + dest: /etc/ + mode: "0644" + +- name: Upload AryaOS Config + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/99-aryaos-dispatcher" + dest: /etc/NetworkManager/dispatcher.d/ + mode: "0644" + +- name: Upload ZeroTier install script + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/install_zt.sh" + dest: /usr/local/sbin + mode: "0755" + +- name: Install ZeroTier + ansible.builtin.command: + cmd: /usr/local/sbin/install_zt.sh + creates: /usr/local/bin/zerotier-cli diff --git a/ansible/roles/aryaos/tasks/portal.yml b/ansible/roles/aryaos/tasks/portal.yml new file mode 100644 index 0000000..f16ad8f --- /dev/null +++ b/ansible/roles/aryaos/tasks/portal.yml @@ -0,0 +1,39 @@ +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Captive portal + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/html" + dest: /var/www/html + mode: "0755" + +- name: CalFire tiles + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/calfire_airbases" + dest: /var/www/html/calfire_airbases/ + mode: "0755" + + +# - name: Fix logs recorder directory listing +# ansible.builtin.lineinfile: +# path: /etc/lighttpd/lighttpd.conf +# line: "dir-listing.activate = \"enable\"" +# state: present +# insertafter: "# FIXME For logs recorder directory listing, currently 403's." +# backup: yes +# validate: "/usr/sbin/lighttpd -t -f %s" +# mode: "0644" + diff --git a/ansible/roles/aryaos/tasks/pytak.yml b/ansible/roles/aryaos/tasks/pytak.yml new file mode 100644 index 0000000..c57d64c --- /dev/null +++ b/ansible/roles/aryaos/tasks/pytak.yml @@ -0,0 +1,57 @@ +# code: language=ansible +# pytak.yml - Install PyTAK and other dependencies. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Download AirCOT Debian package + ansible.builtin.get_url: + url: "{{ aircot_deb_url }}" + dest: /usr/src/{{ aircot_deb }} + mode: "0644" + +- name: Install AirCOT Debian package + ansible.builtin.apt: + deb: /usr/src/{{ aircot_deb }} + +- name: Download PyTAK Debian package + ansible.builtin.get_url: + url: "{{ pytak_deb_url }}" + dest: /usr/src/{{ pytak_deb }} + mode: "0644" + +- name: Install PyTAK Debian package + ansible.builtin.apt: + deb: /usr/src/{{ pytak_deb }} + +- name: Download takproto Debian package + ansible.builtin.get_url: + url: "{{ takproto_deb_url }}" + dest: /usr/src/{{ takproto_deb }} + mode: "0644" + +- name: Install takproto Debian package + ansible.builtin.apt: + deb: /usr/src/{{ takproto_deb }} + +- name: Download asyncinotify Debian package + ansible.builtin.get_url: + url: "{{ asyncinotify_deb_url }}" + dest: /usr/src/{{ asyncinotify_deb }} + mode: "0644" + +- name: Install asyncinotify_latest_all Debian package + ansible.builtin.apt: + deb: /usr/src/{{ asyncinotify_deb }} diff --git a/ansible/roles/aryaos/tasks/recorder.yml b/ansible/roles/aryaos/tasks/recorder.yml new file mode 100644 index 0000000..67a7169 --- /dev/null +++ b/ansible/roles/aryaos/tasks/recorder.yml @@ -0,0 +1,30 @@ +# code: language=ansible +# recorder.yml +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Copy AryaOS recorder lighttpd config + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/99-aryaos-recorder.conf" + dest: /etc/lighttpd/conf-available/99-aryaos-recorder.conf + mode: "0644" + +- name: Enable AryaOS recorder lighttpd config + ansible.builtin.file: + src: /etc/lighttpd/conf-available/99-aryaos-recorder.conf + dest: /etc/lighttpd/conf-enabled/99-aryaos-recorder.conf + state: link + notify: Restart lighttpd diff --git a/stage5-common/00-install/files/LINCOT-config.txt b/ansible/roles/aryaos/tasks/tar1090.yml similarity index 60% rename from stage5-common/00-install/files/LINCOT-config.txt rename to ansible/roles/aryaos/tasks/tar1090.yml index b32ffd5..01fc17f 100644 --- a/stage5-common/00-install/files/LINCOT-config.txt +++ b/ansible/roles/aryaos/tasks/tar1090.yml @@ -1,12 +1,12 @@ -# AryaOS LINCOT-config.txt +# code: language=ansible # -# LINCOT Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,5 +15,8 @@ # limitations under the License. # - -CALLSIGN="" +- name: Install tar1090 + ansible.builtin.script: + cmd: install-tar1090.sh + creates: /etc/default/tar1090 + become: true diff --git a/ansible/roles/aryaos/tasks/wifi.yml b/ansible/roles/aryaos/tasks/wifi.yml new file mode 100644 index 0000000..fd5cda4 --- /dev/null +++ b/ansible/roles/aryaos/tasks/wifi.yml @@ -0,0 +1,69 @@ +# code: language=ansible +# wifi.yml - Configure WiFi portal. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Install OS packages. + ansible.builtin.package: + name: + - iptables + - comitup + +- name: Copy modified NetworkManager + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/NetworkManager.py" + dest: /usr/lib/python3/dist-packages/NetworkManager.py + mode: "0644" + +- name: Fix comitup port + ansible.builtin.command: + cmd: sed --follow-symlinks -i -E -e "s/port=80/port=9080/" /usr/share/comitup/web/comitupweb.py + +- name: Copy comitup configs + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/comitup.conf" + dest: /etc + mode: "0644" + +- name: Copy comitup script + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/run_comitup.sh" + dest: /usr/local/sbin/ + mode: "0755" + +- name: Copy comitup callback + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/comitup-callback.sh" + dest: /usr/local/sbin/ + mode: "0755" + +- name: Copy comitup service + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/comitup.service" + dest: /lib/systemd/system/ + mode: "0644" + +- name: Copy comitup json + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/comitup.json" + dest: /var/lib/comitup/ + mode: "0644" + +- name: Copy wifi nuke + ansible.builtin.copy: + src: "{{ shared_files }}/aryaos/wifi-nuke.py" + dest: /usr/local/sbin/ + mode: "0755" diff --git a/stage6-air/04-aryaair/files/run_ADSBCOT.sh b/ansible/roles/base/tasks/main.yml old mode 100755 new mode 100644 similarity index 50% rename from stage6-air/04-aryaair/files/run_ADSBCOT.sh rename to ansible/roles/base/tasks/main.yml index 7f9c0e9..be50b63 --- a/stage6-air/04-aryaair/files/run_ADSBCOT.sh +++ b/ansible/roles/base/tasks/main.yml @@ -1,13 +1,12 @@ -#!/bin/bash -# AryaOS run_ADSBCOT.sh +# code: language=ansible # -# Startup file for ADSBCOT. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -16,17 +15,10 @@ # limitations under the License. # -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" -ADSBCOT_CONFIG="/boot/ADSBCOT-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -fi - -if [ -f $ADSBCOT_CONFIG ]; then - . $ADSBCOT_CONFIG -fi +- name: Add SSH key for ansible + ansible.posix.authorized_key: + user: ansible + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA9iUu9FN16NjMKNPzD+RAGFEoMP43a5bQRJyzcx2VKl ansible@kelp generated 2022-10-12" -set +a -/usr/local/bin/adsbcot +- name: Include packages + ansible.builtin.include_tasks: packages.yml diff --git a/ansible/roles/base/tasks/packages.yml b/ansible/roles/base/tasks/packages.yml new file mode 100644 index 0000000..a408b92 --- /dev/null +++ b/ansible/roles/base/tasks/packages.yml @@ -0,0 +1,71 @@ +# code: language=ansible +# packages.yml - Install base packages. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Install base OS packages. + ansible.builtin.package: + update_cache: true + name: + - curl + - rtl-sdr + - vim + - librtlsdr-dev + - gqrx-sdr + - net-tools + - git + - build-essential + - devscripts + - debhelper + - libboost-system-dev + - libboost-program-options-dev + - libboost-regex-dev + - libboost-filesystem-dev + - libsoapysdr-dev + - soapysdr-module-rtlsdr + - lighttpd + - gpsd + - gpsd-clients + - python3-pip + - python3-cryptography + - tcpdump + - netcat-openbsd + - nmap + - socat + - net-tools + - tmux + - wget + - ca-certificates + - apt-transport-https + - ca-certificates + - curl + - software-properties-common + - python3-pip + - virtualenv + - python3-setuptools + - libssl-dev + - aha + - git + - make + - gcc + - g++ + - cmake + - pkg-config + - librtlsdr-dev + - whiptail + - libpq-dev + - build-essential + - acl diff --git a/ansible/roles/dronecot/tasks/containers.yml b/ansible/roles/dronecot/tasks/containers.yml new file mode 100644 index 0000000..87f2514 --- /dev/null +++ b/ansible/roles/dronecot/tasks/containers.yml @@ -0,0 +1,29 @@ +# code: language=ansible +# dronecot.yml - Install DroneCOT. +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: UAS Broker + ansible.builtin.copy: + src: "{{ shared_files }}/uas/docker-uas-broker" + dest: /usr/share/docker-uas-broker + mode: "0755" + +- name: UAS Sensor + ansible.builtin.copy: + src: "{{ shared_files }}/uas/docker-uas-sensor" + dest: /usr/share/docker-uas-sensor + mode: "0755" diff --git a/ansible/roles/dronecot/tasks/docker.yml b/ansible/roles/dronecot/tasks/docker.yml new file mode 100644 index 0000000..66af997 --- /dev/null +++ b/ansible/roles/dronecot/tasks/docker.yml @@ -0,0 +1,67 @@ +# code: language=ansible +# docker.yml +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +- name: Add Docker GPG apt Key + ansible.builtin.apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + +- name: Add Docker Repository + ansible.builtin.apt_repository: + repo: deb https://download.docker.com/linux/debian bookworm stable + state: present + +- name: Update apt and install docker-ce + ansible.builtin.apt: + name: docker-ce + update_cache: true + +- name: Install docker-ce-cli + ansible.builtin.apt: + name: docker-ce-cli + +- name: Install containerd.io + ansible.builtin.apt: + name: containerd.io + +- name: Install docker-buildx-plugin + ansible.builtin.apt: + name: docker-buildx-plugin + +- name: Install docker-compose-plugin + ansible.builtin.apt: + name: docker-compose-plugin + +# - name: Pull default Docker image +# community.docker.docker_image: +# name: "{{ default_container_image }}" +# source: pull + +# - name: Create default containers +# community.docker.docker_container: +# name: "{{ default_container_name }}{{ item }}" +# image: "{{ default_container_image }}" +# command: "{{ default_container_command }}" +# state: present +# with_sequence: count={{ container_count }} + +- name: Add users to docker group + ansible.builtin.user: + name: node-red + groups: docker diff --git a/stage6-air/04-aryaair/files/AryaAir.service b/ansible/roles/dronecot/tasks/dronecot.yml similarity index 50% rename from stage6-air/04-aryaair/files/AryaAir.service rename to ansible/roles/dronecot/tasks/dronecot.yml index cf3ccd0..eaa85ba 100644 --- a/stage6-air/04-aryaair/files/AryaAir.service +++ b/ansible/roles/dronecot/tasks/dronecot.yml @@ -1,12 +1,13 @@ -# AryaOS AryaAir.service +# code: language=ansible +# dronecot.yml - Install DroneCOT. # -# Meta-app for AryaOS air SA services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -15,16 +16,12 @@ # limitations under the License. # -[Unit] -Description=AryaAir: Meta-app for AryaOS air SA services. -Documentation=https://github.com/SNSTAC/AryaOS -Wants=network.target -After=network.target - -[Service] -Type=oneshot -ExecStart=/bin/true -RemainAfterExit=yes +- name: Download DroneCOT Debian package + ansible.builtin.get_url: + url: "{{ dronecot_deb_url }}" + dest: /usr/src/{{ dronecot_deb }} + mode: "0644" -[Install] -WantedBy=default.target +- name: Install DroneCOT Debian package + ansible.builtin.apt: + deb: /usr/src/{{ dronecot_deb }} diff --git a/stage7-sea/00-install/files/run_aiscatcher.sh b/ansible/roles/dronecot/tasks/main.yml old mode 100755 new mode 100644 similarity index 54% rename from stage7-sea/00-install/files/run_aiscatcher.sh rename to ansible/roles/dronecot/tasks/main.yml index 456635b..1111765 --- a/stage7-sea/00-install/files/run_aiscatcher.sh +++ b/ansible/roles/dronecot/tasks/main.yml @@ -1,13 +1,12 @@ -#!/bin/bash -# AryaOS run_aiscatcher.sh +# code: language=ansible # -# Startup file for aiscatcher. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ +# Copyright Sensors & Signals LLC https://www.snstac.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +15,11 @@ # limitations under the License. # -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" +- name: Include Docker + ansible.builtin.include_tasks: docker.yml + +- name: Include DroneCOT + ansible.builtin.include_tasks: dronecot.yml -set +a -/usr/local/sbin/aiscatcher -u 127.0.0.1 5050 -e 38400 /dev/ttyUSB0 -v 10 \ No newline at end of file +- name: Include Containers + ansible.builtin.include_tasks: containers.yml diff --git a/ansible/roles/node-red/tasks/main.yml b/ansible/roles/node-red/tasks/main.yml new file mode 100644 index 0000000..2053598 --- /dev/null +++ b/ansible/roles/node-red/tasks/main.yml @@ -0,0 +1,82 @@ +# Node-RED +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- name: Download update-nodejs-and-nodered installer + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered + dest: /usr/src/update-nodejs-and-nodered + mode: "0755" + +- name: Create node-red user + ansible.builtin.user: + name: node-red + comment: Node-RED service user + groups: sudo, adm, video, plugdev, dialout + append: true + password: "!" + +- name: Copy node-red.sudoers + ansible.builtin.copy: + src: "{{ shared_files }}/node-red/node-red.sudoers" + dest: /etc/sudoers.d/node-red + mode: "0440" + +- name: Run update-nodejs-and-nodered installer + ansible.builtin.command: + cmd: /bin/bash /usr/src/update-nodejs-and-nodered --confirm-install --nodered-user=node-red --confirm-root --skip-pi --no-init + creates: /home/node-red/.node-red + become: true + become_user: node-red + +- name: Install Node-RED Nodes + ansible.builtin.command: + cmd: | + npm install node-red-contrib-tak + npm install node-red-contrib-sitx + npm install node-red-contrib-tfr2cot + npm install node-red-contrib-web-worldmap + npm install node-red-dashboard + npm install node-red-node-ui-table + npm install node-red-contrib-ui-upload + npm install node-red-contrib-qrcode-generator + npm install axios + chdir: /home/node-red/.node-red + creates: /home/node-red/.node-red/node_modules/node-red-contrib-tak + become: true + become_user: node-red + +- name: Copy aryaos_flows.json to aryaos_flows.json + ansible.builtin.copy: + src: "{{ shared_files }}/node-red/aryaos_flows.json" + dest: /home/node-red/.node-red/aryaos_flows.json + owner: node-red + group: node-red + mode: "0640" + +- name: Copy aryaos_flows.json to flows.json + ansible.builtin.copy: + src: "{{ shared_files }}/node-red/aryaos_flows.json" + dest: /home/node-red/.node-red/flows.json + owner: node-red + group: node-red + mode: "0640" + +- name: Enable node-red service + ansible.builtin.systemd_service: + name: nodered.service + enabled: true + daemon_reload: true diff --git a/ansible/secret b/ansible/secret new file mode 100644 index 0000000..d1edd05 --- /dev/null +++ b/ansible/secret @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +33623062383866616265613465343362633862383861363266303564316563363966393661306430 +3438613231663335323164383130636531356461313262390a303531656564616333366539653765 +61666563613763333762343435343331396235326161346665326639336439306466366461633237 +6563663062313662350a376632386438353232363662366539373738663166313831626235376363 +34646430643365366538623064643364663766373830616364623162326439323764633332636235 +64323464323965303761626265646335333065336165383865386338393831373834386636613635 +65653231316563336632343633336334396166353239616365616633363930643266303435633539 +64376635633363613637653830343634316531666431323332363636373964653231653461653464 +6436 diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 0000000..a1ce97f --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,37 @@ +# code: language=ansible +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +- name: Default + hosts: all + become: true + vars_files: + - vars.yml + pre_tasks: + - name: Update repository index (Debian) + tags: always + ansible.builtin.apt: + cache_valid_time: 86400 + changed_when: false + when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian" + roles: + - base + - role: aryaos + - role: adsbcot + - role: aiscot + - role: dronecot + - role: node-red diff --git a/ansible/vars.yml b/ansible/vars.yml new file mode 100644 index 0000000..b45d6d3 --- /dev/null +++ b/ansible/vars.yml @@ -0,0 +1,45 @@ +# +# Copyright Sensors & Signals LLC https://www.snstac.com +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +shared_files: "{{ inventory_dir }}/../shared_files" + +adsb_sdr_sn: stx:1090:0 +uat_sdr_sn: stx:978:0 + +adsbcot_deb: adsbcot_latest_all.deb +adsbcot_deb_url: https://github.com/snstac/adsbcot/releases/latest/download/{{ adsbcot_deb }} + +readsb_deb: readsb_3.14.1621_amd64.deb +readsb_deb_url: https://github.com/snstac/readsb/releases/download/v3.14.1621-2/{{ readsb_deb }} + +aircot_deb: aircot_latest_all.deb +aircot_deb_url: https://github.com/snstac/aircot/releases/latest/download/{{ aircot_deb }} + +pytak_deb: pytak_latest_all.deb +pytak_deb_url: https://github.com/snstac/pytak/releases/latest/download/{{ pytak_deb }} + +takproto_deb: takproto_latest_all.deb +takproto_deb_url: https://github.com/snstac/takproto/releases/latest/download/{{ takproto_deb }} + +asyncinotify_deb: python3-asyncinotify_4.0.9-1_all.deb +asyncinotify_deb_url: https://github.com/snstac/asyncinotify/releases/download/v4.0.9-4/{{ asyncinotify_deb }} + +dronecot_deb: dronecot_latest_all.deb +dronecot_deb_url: https://github.com/snstac/dronecot/releases/latest/download/{{ dronecot_deb }} + +aiscot_deb: aiscot_latest_all.deb +aiscot_deb_url: https://github.com/snstac/aiscot/releases/latest/download/{{ aiscot_deb }} diff --git a/ansible/vault.txt b/ansible/vault.txt new file mode 100644 index 0000000..ffae9ac --- /dev/null +++ b/ansible/vault.txt @@ -0,0 +1 @@ +dcaTmDZUGgrDMWYADW2H diff --git a/build.sh b/build.sh deleted file mode 100755 index dad5425..0000000 --- a/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# AryaOS build.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# shellcheck disable=SC2164 -(cd ./pi-gen; ./build.sh -c ../config) diff --git a/config b/config deleted file mode 100644 index 22924d3..0000000 --- a/config +++ /dev/null @@ -1,41 +0,0 @@ -# AryaOS config -# -# pi-gen config for AryaOS -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -AOS_FLAVOR="AryaOS" - -IMG_NAME="aryaos-1.1.0-beta5" - -PI_GEN_RELEASE="AryaOS: An Operating System for Modern Situational Awareness." -TARGET_HOSTNAME="aryaos" -FIRST_USER_NAME="pi" -FIRST_USER_PASS="aryaos415" -STAGE_LIST="stage0 stage1 stage2 ../stage3-base ../stage3-wifi ../stage4-node-red ../stage5-common ../stage6-air ../stage7-sea ../stage8-uas ../stage9-docker" -DISABLE_FIRST_BOOT_USER_RENAME=1 -RELEASE="bookworm" -WPA_ESSID="AryaOS-WiFi" -WPA_PASSWORD="aryaos415" -WPA_COUNTRY="US" -LOCALE_DEFAULT="en_US.UTF-8" -KEYBOARD_LAYOUT="English (US)" -KEYBOARD_KEYMAP="us" -ENABLE_SSH=1 -APT_PROXY="http://172.17.2.88:3142" - -DUMP1090_RECEIVER_SERIAL="stx:1090:0" -DUMP978_RECEIVER_SERIAL="stx:978:0" -COMITUP_WEB_PORT="9080" -AOS_SERVICES="AISCOT ADSBCOT LINCOT DroneCOT nodered readsb" diff --git a/docs/config.md b/docs/config.md index d7733ef..eef2c07 100644 --- a/docs/config.md +++ b/docs/config.md @@ -50,7 +50,7 @@ To send CoT to a different destination, you'll need to SSH into AryaOS and chang configuration for ``adsbcot``. 1. SSH into AryaOS: ``ssh pi@AryaOS.local`` -2. Edit adsbcot's configuration: ``sudo nano /boot/adsbcot-config.txt`` (N.B. This is *not* an INI-style file.) +2. Edit adsbcot's configuration: ``sudo nano /etc/adsbcot-config.txt`` (N.B. This is *not* an INI-style file.) 3. Save & reboot. ### Change dump1090-fa & dump978-fa SDR serial numbers diff --git a/docs/specs.md b/docs/specs.md new file mode 100644 index 0000000..f616274 --- /dev/null +++ b/docs/specs.md @@ -0,0 +1 @@ +* RFC 4122 UUID diff --git a/stage3-base/00-install/files/99-AryaOS-Dispatcher b/shared_files/aryaos/99-aryaos-dispatcher similarity index 72% rename from stage3-base/00-install/files/99-AryaOS-Dispatcher rename to shared_files/aryaos/99-aryaos-dispatcher index b52c86a..9595585 100644 --- a/stage3-base/00-install/files/99-AryaOS-Dispatcher +++ b/shared_files/aryaos/99-aryaos-dispatcher @@ -1,7 +1,6 @@ #!/bin/bash -# AryaOS 99-AryaOS-Dispatcher -# -# Script to dispatch NetworkManager events for AryaOS. +# AryaOS 99-aryaos-dispatcher +# Dispatch NetworkManager events to AryaOS services for restart. # # Copyright Sensors & Signals LLC https://www.snstac.com/ # @@ -16,7 +15,7 @@ # limitations under the License. # -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" +AOS_CONFIG="/etc/aryaos-config.txt" if [ -n "$IP4_NUM_ADDRESSES" ] && [ "$IP4_NUM_ADDRESSES" -gt 0 ]; then ADDRESS_FAMILIES="$ADDRESS_FAMILIES inet" @@ -40,44 +39,54 @@ fi # We're probably bringing the interface down. [ -n "$ADDRESS_FAMILIES" ] || ADDRESS_FAMILIES="inet" -# Fake ifupdown environment +# Fake 'ifupdown' environment export IFACE="$1" export LOGICAL="$1" export METHOD="NetworkManager" export VERBOSITY="0" -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG + +# Import base AryaOS environment. +if [ -f "$AOS_CONFIG" ]; then + # shellcheck source=aryaos-config.txt + . "$AOS_CONFIG" fi + +# "I'm gonna go-ahead and need you to turn it off, and turn it back on again." +# - John Leonard, summer 2004. restart_aos_services() { for srv in $AOS_SERVICES; do - if [ systemctl is-enabled $srv ]; then - logger "99-AryaOS-Dispatcher restarting $srv" - echo "99-AryaOS-Dispatcher restarting $srv" | systemd-cat -p info -t 99-AryaOS-Dispatcher - systemctl restart $srv || exit 0 + if [ "$(systemctl is-enabled "$srv")" = "enabled" ]; then + echo "99-aryaos-dispatcher restarting $srv" + systemctl restart "$srv" || exit 0 fi done } + +# Update PyTAK's multicast local address, protect pernicious network libraries. set_pytak_mc_addr() { MC_ADDR="${1:-0.0.0.0}" sed --follow-symlinks -i -E -e "s/PYTAK_MULTICAST_LOCAL_ADDR.*/PYTAK_MULTICAST_LOCAL_ADDR=$MC_ADDR/" $AOS_CONFIG } + +# Update URL in captive portal web landing page. set_index_addr() { ADDR="${1:-10.41.0.1}" sed --follow-symlinks -E -e "s/aryaos.local/$ADDR/" < /var/www/html/index2.html > /var/www/html/index.html } + for i in $ADDRESS_FAMILIES; do export ADDRFAM="$i" case "$2" in connectivity-change) if [ "$CONNECTIVITY_STATE" = "LIMITED" ]; then - set_pytak_mc_addr $WIFI_AP_IP - set_index_addr $WIFI_AP_IP + set_pytak_mc_addr "$WIFI_AP_IP" + set_index_addr "$WIFI_AP_IP" elif [ "$CONNECTIVITY_STATE" = "FULL" ]; then set_pytak_mc_addr @@ -89,9 +98,9 @@ for i in $ADDRESS_FAMILIES; do up|vpn-up) export MODE="start" export PHASE="post-up" - if [ -n "$DHCP4_IP_ADDRESS" && "$PYTAK_MULTICAST_LOCAL_ADDR" != "0.0.0.0" ]; then - set_pytak_mc_addr $DHCP4_IP_ADDRESS - set_index_addr $DHCP4_IP_ADDRESS + if [ -n "$DHCP4_IP_ADDRESS" ] && [ "$PYTAK_MULTICAST_LOCAL_ADDR" != "0.0.0.0" ]; then + set_pytak_mc_addr "$DHCP4_IP_ADDRESS" + set_index_addr "$DHCP4_IP_ADDRESS" fi restart_aos_services diff --git a/shared_files/aryaos/99-aryaos-recorder.conf b/shared_files/aryaos/99-aryaos-recorder.conf new file mode 100644 index 0000000..4c78683 --- /dev/null +++ b/shared_files/aryaos/99-aryaos-recorder.conf @@ -0,0 +1,7 @@ +# +# 99-aryaos-recorder.conf from AryaOS Ansible +# + +$HTTP["url"] =~ "^/logs($|/)" { + dir-listing.activate = "enable" + } \ No newline at end of file diff --git a/stage3-wifi/00-install/files/NetworkManager.py b/shared_files/aryaos/NetworkManager.py similarity index 100% rename from stage3-wifi/00-install/files/NetworkManager.py rename to shared_files/aryaos/NetworkManager.py diff --git a/shared_files/aryaos/README-aryaos.txt b/shared_files/aryaos/README-aryaos.txt new file mode 100644 index 0000000..e644db1 --- /dev/null +++ b/shared_files/aryaos/README-aryaos.txt @@ -0,0 +1,7 @@ +May 8, 2024 +------------- + +Thank you for purchasing or downloading AryaOS. For support, please contact: +info@snstac.com or +1-415-598-8226 + +Thank You. diff --git a/shared_files/aryaos/aryaos-config.txt b/shared_files/aryaos/aryaos-config.txt new file mode 100644 index 0000000..2b6b2dc --- /dev/null +++ b/shared_files/aryaos/aryaos-config.txt @@ -0,0 +1,37 @@ +# AryaOS aryaos-config.txt +# Global environmental configuration file for AryaOS-based systems. +# Configures PyTAK, et al. +# +# Copyright Sensors & Signals LLC https://www.snstac.com/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Where do we send our Cursor on Target TAK messages? +# See: https://pytak.readthedocs.io/en/stable/configuration/ +COT_URL=udp+wo://239.2.3.1:6969 + + +# For Mesh SA & multicast COT_URLs: Which network interface (wifi, ethernet) do we bind to? +# Options are IP, or 0.0.0.0 for all. Default is WiFi AP IP: 10.41.0.1 +PYTAK_MULTICAST_LOCAL_ADDR=10.41.0.1 + +# DEPRECATED: Legacy setting. +WIFI_AP_IP=10.41.0.1 + + +# List of services to restart if network state changes (wifi up, ethernet down, etc). +AOS_SERVICES="readsb dump1090-fa dump978-fa tar1090 dump1090 dump1090-mutability gpsd aiscatcher nodered aiscot lincot adsbcot dronecot adsbxcot aprscot spotcot" + + +# Our ID, used to generate WiFi AP SSID, lincot UID, etc. +# Automatically set on first-boot, do not modify. NO STEP. +NODE_ID="" diff --git a/shared_files/aryaos/aryaos.sudoers b/shared_files/aryaos/aryaos.sudoers new file mode 100644 index 0000000..46fcc32 --- /dev/null +++ b/shared_files/aryaos/aryaos.sudoers @@ -0,0 +1,49 @@ +# AryaOS AryaOS.sudoers +# +# Configures custom logging for AryaOS to support NIST SP 800-32 Audit Records. +# +# Copyright Sensors & Signals LLC https://www.snstac.com/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +Defaults log_format=json + +# enables logging sub-commands +Defaults log_subcmds + +# Users in wheel can run chroot. +Defaults:%wheel runchroot=* + +# Log user & sudo input & output. +Defaults log_input, log_output + +# Don't log input passwords (via log_input). +Defaults !log_passwords + +# Don't log the output from sudoreplay, when called from sudo itself. +Defaults!/usr/bin/sudoreplay !log_output + +node-red ALL=(root) NOPASSWD: /sbin/reboot +node-red ALL=(root) NOPASSWD: /sbin/shutdown +node-red ALL=(root) NOPASSWD: /bin/systemctl status + +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/aryaos-config.txt /etc/aryaos-config.txt +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/adsbcot-config.txt /etc/adsbcot-config.txt +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/lincot-config.txt /etc/lincot-config.txt +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/aiscot-config.txt /etc/aiscot-config.txt +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/dronecot-config.txt /etc/dronecot-config.txt + +node-red ALL=(root) NOPASSWD: /usr/local/sbin/wifi-nuke.py +node-red ALL=(root) NOPASSWD: /usr/bin/nmcli device disconnect wlan0 + +node-red ALL=(root) NOPASSWD: /usr/bin/dpkg -i /home/node-red/update.deb diff --git a/stage5-common/00-install/files/calfire_airbases/4/2/5.png b/shared_files/aryaos/calfire_airbases/4/2/5.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/4/2/5.png rename to shared_files/aryaos/calfire_airbases/4/2/5.png diff --git a/stage5-common/00-install/files/calfire_airbases/4/2/6.png b/shared_files/aryaos/calfire_airbases/4/2/6.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/4/2/6.png rename to shared_files/aryaos/calfire_airbases/4/2/6.png diff --git a/stage5-common/00-install/files/calfire_airbases/5/4/11.png b/shared_files/aryaos/calfire_airbases/5/4/11.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/5/4/11.png rename to shared_files/aryaos/calfire_airbases/5/4/11.png diff --git a/stage5-common/00-install/files/calfire_airbases/5/4/12.png b/shared_files/aryaos/calfire_airbases/5/4/12.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/5/4/12.png rename to shared_files/aryaos/calfire_airbases/5/4/12.png diff --git a/stage5-common/00-install/files/calfire_airbases/5/4/13.png b/shared_files/aryaos/calfire_airbases/5/4/13.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/5/4/13.png rename to shared_files/aryaos/calfire_airbases/5/4/13.png diff --git a/stage5-common/00-install/files/calfire_airbases/5/5/11.png b/shared_files/aryaos/calfire_airbases/5/5/11.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/5/5/11.png rename to shared_files/aryaos/calfire_airbases/5/5/11.png diff --git a/stage5-common/00-install/files/calfire_airbases/5/5/12.png b/shared_files/aryaos/calfire_airbases/5/5/12.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/5/5/12.png rename to shared_files/aryaos/calfire_airbases/5/5/12.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/10/23.png b/shared_files/aryaos/calfire_airbases/6/10/23.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/10/23.png rename to shared_files/aryaos/calfire_airbases/6/10/23.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/10/24.png b/shared_files/aryaos/calfire_airbases/6/10/24.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/10/24.png rename to shared_files/aryaos/calfire_airbases/6/10/24.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/10/25.png b/shared_files/aryaos/calfire_airbases/6/10/25.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/10/25.png rename to shared_files/aryaos/calfire_airbases/6/10/25.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/11/22.png b/shared_files/aryaos/calfire_airbases/6/11/22.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/11/22.png rename to shared_files/aryaos/calfire_airbases/6/11/22.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/11/23.png b/shared_files/aryaos/calfire_airbases/6/11/23.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/11/23.png rename to shared_files/aryaos/calfire_airbases/6/11/23.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/11/24.png b/shared_files/aryaos/calfire_airbases/6/11/24.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/11/24.png rename to shared_files/aryaos/calfire_airbases/6/11/24.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/11/25.png b/shared_files/aryaos/calfire_airbases/6/11/25.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/11/25.png rename to shared_files/aryaos/calfire_airbases/6/11/25.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/9/23.png b/shared_files/aryaos/calfire_airbases/6/9/23.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/9/23.png rename to shared_files/aryaos/calfire_airbases/6/9/23.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/9/24.png b/shared_files/aryaos/calfire_airbases/6/9/24.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/9/24.png rename to shared_files/aryaos/calfire_airbases/6/9/24.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/9/25.png b/shared_files/aryaos/calfire_airbases/6/9/25.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/9/25.png rename to shared_files/aryaos/calfire_airbases/6/9/25.png diff --git a/stage5-common/00-install/files/calfire_airbases/6/9/26.png b/shared_files/aryaos/calfire_airbases/6/9/26.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/6/9/26.png rename to shared_files/aryaos/calfire_airbases/6/9/26.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/46.png b/shared_files/aryaos/calfire_airbases/7/19/46.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/46.png rename to shared_files/aryaos/calfire_airbases/7/19/46.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/47.png b/shared_files/aryaos/calfire_airbases/7/19/47.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/47.png rename to shared_files/aryaos/calfire_airbases/7/19/47.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/48.png b/shared_files/aryaos/calfire_airbases/7/19/48.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/48.png rename to shared_files/aryaos/calfire_airbases/7/19/48.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/49.png b/shared_files/aryaos/calfire_airbases/7/19/49.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/49.png rename to shared_files/aryaos/calfire_airbases/7/19/49.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/50.png b/shared_files/aryaos/calfire_airbases/7/19/50.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/50.png rename to shared_files/aryaos/calfire_airbases/7/19/50.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/51.png b/shared_files/aryaos/calfire_airbases/7/19/51.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/51.png rename to shared_files/aryaos/calfire_airbases/7/19/51.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/19/52.png b/shared_files/aryaos/calfire_airbases/7/19/52.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/19/52.png rename to shared_files/aryaos/calfire_airbases/7/19/52.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/46.png b/shared_files/aryaos/calfire_airbases/7/20/46.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/46.png rename to shared_files/aryaos/calfire_airbases/7/20/46.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/47.png b/shared_files/aryaos/calfire_airbases/7/20/47.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/47.png rename to shared_files/aryaos/calfire_airbases/7/20/47.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/48.png b/shared_files/aryaos/calfire_airbases/7/20/48.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/48.png rename to shared_files/aryaos/calfire_airbases/7/20/48.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/49.png b/shared_files/aryaos/calfire_airbases/7/20/49.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/49.png rename to shared_files/aryaos/calfire_airbases/7/20/49.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/50.png b/shared_files/aryaos/calfire_airbases/7/20/50.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/50.png rename to shared_files/aryaos/calfire_airbases/7/20/50.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/20/51.png b/shared_files/aryaos/calfire_airbases/7/20/51.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/20/51.png rename to shared_files/aryaos/calfire_airbases/7/20/51.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/46.png b/shared_files/aryaos/calfire_airbases/7/21/46.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/46.png rename to shared_files/aryaos/calfire_airbases/7/21/46.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/47.png b/shared_files/aryaos/calfire_airbases/7/21/47.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/47.png rename to shared_files/aryaos/calfire_airbases/7/21/47.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/48.png b/shared_files/aryaos/calfire_airbases/7/21/48.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/48.png rename to shared_files/aryaos/calfire_airbases/7/21/48.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/49.png b/shared_files/aryaos/calfire_airbases/7/21/49.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/49.png rename to shared_files/aryaos/calfire_airbases/7/21/49.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/50.png b/shared_files/aryaos/calfire_airbases/7/21/50.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/50.png rename to shared_files/aryaos/calfire_airbases/7/21/50.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/21/51.png b/shared_files/aryaos/calfire_airbases/7/21/51.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/21/51.png rename to shared_files/aryaos/calfire_airbases/7/21/51.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/45.png b/shared_files/aryaos/calfire_airbases/7/22/45.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/45.png rename to shared_files/aryaos/calfire_airbases/7/22/45.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/46.png b/shared_files/aryaos/calfire_airbases/7/22/46.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/46.png rename to shared_files/aryaos/calfire_airbases/7/22/46.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/47.png b/shared_files/aryaos/calfire_airbases/7/22/47.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/47.png rename to shared_files/aryaos/calfire_airbases/7/22/47.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/48.png b/shared_files/aryaos/calfire_airbases/7/22/48.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/48.png rename to shared_files/aryaos/calfire_airbases/7/22/48.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/49.png b/shared_files/aryaos/calfire_airbases/7/22/49.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/49.png rename to shared_files/aryaos/calfire_airbases/7/22/49.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/50.png b/shared_files/aryaos/calfire_airbases/7/22/50.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/50.png rename to shared_files/aryaos/calfire_airbases/7/22/50.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/22/51.png b/shared_files/aryaos/calfire_airbases/7/22/51.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/22/51.png rename to shared_files/aryaos/calfire_airbases/7/22/51.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/45.png b/shared_files/aryaos/calfire_airbases/7/23/45.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/45.png rename to shared_files/aryaos/calfire_airbases/7/23/45.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/46.png b/shared_files/aryaos/calfire_airbases/7/23/46.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/46.png rename to shared_files/aryaos/calfire_airbases/7/23/46.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/47.png b/shared_files/aryaos/calfire_airbases/7/23/47.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/47.png rename to shared_files/aryaos/calfire_airbases/7/23/47.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/48.png b/shared_files/aryaos/calfire_airbases/7/23/48.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/48.png rename to shared_files/aryaos/calfire_airbases/7/23/48.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/49.png b/shared_files/aryaos/calfire_airbases/7/23/49.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/49.png rename to shared_files/aryaos/calfire_airbases/7/23/49.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/50.png b/shared_files/aryaos/calfire_airbases/7/23/50.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/50.png rename to shared_files/aryaos/calfire_airbases/7/23/50.png diff --git a/stage5-common/00-install/files/calfire_airbases/7/23/51.png b/shared_files/aryaos/calfire_airbases/7/23/51.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/7/23/51.png rename to shared_files/aryaos/calfire_airbases/7/23/51.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/100.png b/shared_files/aryaos/calfire_airbases/8/39/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/100.png rename to shared_files/aryaos/calfire_airbases/8/39/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/101.png b/shared_files/aryaos/calfire_airbases/8/39/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/101.png rename to shared_files/aryaos/calfire_airbases/8/39/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/102.png b/shared_files/aryaos/calfire_airbases/8/39/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/102.png rename to shared_files/aryaos/calfire_airbases/8/39/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/103.png b/shared_files/aryaos/calfire_airbases/8/39/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/103.png rename to shared_files/aryaos/calfire_airbases/8/39/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/104.png b/shared_files/aryaos/calfire_airbases/8/39/104.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/104.png rename to shared_files/aryaos/calfire_airbases/8/39/104.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/92.png b/shared_files/aryaos/calfire_airbases/8/39/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/92.png rename to shared_files/aryaos/calfire_airbases/8/39/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/93.png b/shared_files/aryaos/calfire_airbases/8/39/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/93.png rename to shared_files/aryaos/calfire_airbases/8/39/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/94.png b/shared_files/aryaos/calfire_airbases/8/39/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/94.png rename to shared_files/aryaos/calfire_airbases/8/39/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/95.png b/shared_files/aryaos/calfire_airbases/8/39/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/95.png rename to shared_files/aryaos/calfire_airbases/8/39/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/96.png b/shared_files/aryaos/calfire_airbases/8/39/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/96.png rename to shared_files/aryaos/calfire_airbases/8/39/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/97.png b/shared_files/aryaos/calfire_airbases/8/39/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/97.png rename to shared_files/aryaos/calfire_airbases/8/39/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/98.png b/shared_files/aryaos/calfire_airbases/8/39/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/98.png rename to shared_files/aryaos/calfire_airbases/8/39/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/39/99.png b/shared_files/aryaos/calfire_airbases/8/39/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/39/99.png rename to shared_files/aryaos/calfire_airbases/8/39/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/100.png b/shared_files/aryaos/calfire_airbases/8/40/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/100.png rename to shared_files/aryaos/calfire_airbases/8/40/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/101.png b/shared_files/aryaos/calfire_airbases/8/40/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/101.png rename to shared_files/aryaos/calfire_airbases/8/40/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/102.png b/shared_files/aryaos/calfire_airbases/8/40/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/102.png rename to shared_files/aryaos/calfire_airbases/8/40/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/103.png b/shared_files/aryaos/calfire_airbases/8/40/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/103.png rename to shared_files/aryaos/calfire_airbases/8/40/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/92.png b/shared_files/aryaos/calfire_airbases/8/40/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/92.png rename to shared_files/aryaos/calfire_airbases/8/40/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/93.png b/shared_files/aryaos/calfire_airbases/8/40/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/93.png rename to shared_files/aryaos/calfire_airbases/8/40/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/94.png b/shared_files/aryaos/calfire_airbases/8/40/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/94.png rename to shared_files/aryaos/calfire_airbases/8/40/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/95.png b/shared_files/aryaos/calfire_airbases/8/40/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/95.png rename to shared_files/aryaos/calfire_airbases/8/40/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/96.png b/shared_files/aryaos/calfire_airbases/8/40/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/96.png rename to shared_files/aryaos/calfire_airbases/8/40/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/97.png b/shared_files/aryaos/calfire_airbases/8/40/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/97.png rename to shared_files/aryaos/calfire_airbases/8/40/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/98.png b/shared_files/aryaos/calfire_airbases/8/40/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/98.png rename to shared_files/aryaos/calfire_airbases/8/40/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/40/99.png b/shared_files/aryaos/calfire_airbases/8/40/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/40/99.png rename to shared_files/aryaos/calfire_airbases/8/40/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/100.png b/shared_files/aryaos/calfire_airbases/8/41/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/100.png rename to shared_files/aryaos/calfire_airbases/8/41/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/101.png b/shared_files/aryaos/calfire_airbases/8/41/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/101.png rename to shared_files/aryaos/calfire_airbases/8/41/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/102.png b/shared_files/aryaos/calfire_airbases/8/41/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/102.png rename to shared_files/aryaos/calfire_airbases/8/41/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/103.png b/shared_files/aryaos/calfire_airbases/8/41/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/103.png rename to shared_files/aryaos/calfire_airbases/8/41/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/92.png b/shared_files/aryaos/calfire_airbases/8/41/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/92.png rename to shared_files/aryaos/calfire_airbases/8/41/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/93.png b/shared_files/aryaos/calfire_airbases/8/41/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/93.png rename to shared_files/aryaos/calfire_airbases/8/41/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/94.png b/shared_files/aryaos/calfire_airbases/8/41/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/94.png rename to shared_files/aryaos/calfire_airbases/8/41/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/95.png b/shared_files/aryaos/calfire_airbases/8/41/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/95.png rename to shared_files/aryaos/calfire_airbases/8/41/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/96.png b/shared_files/aryaos/calfire_airbases/8/41/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/96.png rename to shared_files/aryaos/calfire_airbases/8/41/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/97.png b/shared_files/aryaos/calfire_airbases/8/41/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/97.png rename to shared_files/aryaos/calfire_airbases/8/41/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/98.png b/shared_files/aryaos/calfire_airbases/8/41/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/98.png rename to shared_files/aryaos/calfire_airbases/8/41/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/41/99.png b/shared_files/aryaos/calfire_airbases/8/41/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/41/99.png rename to shared_files/aryaos/calfire_airbases/8/41/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/100.png b/shared_files/aryaos/calfire_airbases/8/42/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/100.png rename to shared_files/aryaos/calfire_airbases/8/42/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/101.png b/shared_files/aryaos/calfire_airbases/8/42/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/101.png rename to shared_files/aryaos/calfire_airbases/8/42/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/102.png b/shared_files/aryaos/calfire_airbases/8/42/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/102.png rename to shared_files/aryaos/calfire_airbases/8/42/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/103.png b/shared_files/aryaos/calfire_airbases/8/42/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/103.png rename to shared_files/aryaos/calfire_airbases/8/42/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/92.png b/shared_files/aryaos/calfire_airbases/8/42/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/92.png rename to shared_files/aryaos/calfire_airbases/8/42/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/93.png b/shared_files/aryaos/calfire_airbases/8/42/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/93.png rename to shared_files/aryaos/calfire_airbases/8/42/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/94.png b/shared_files/aryaos/calfire_airbases/8/42/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/94.png rename to shared_files/aryaos/calfire_airbases/8/42/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/95.png b/shared_files/aryaos/calfire_airbases/8/42/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/95.png rename to shared_files/aryaos/calfire_airbases/8/42/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/96.png b/shared_files/aryaos/calfire_airbases/8/42/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/96.png rename to shared_files/aryaos/calfire_airbases/8/42/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/97.png b/shared_files/aryaos/calfire_airbases/8/42/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/97.png rename to shared_files/aryaos/calfire_airbases/8/42/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/98.png b/shared_files/aryaos/calfire_airbases/8/42/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/98.png rename to shared_files/aryaos/calfire_airbases/8/42/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/42/99.png b/shared_files/aryaos/calfire_airbases/8/42/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/42/99.png rename to shared_files/aryaos/calfire_airbases/8/42/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/100.png b/shared_files/aryaos/calfire_airbases/8/43/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/100.png rename to shared_files/aryaos/calfire_airbases/8/43/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/101.png b/shared_files/aryaos/calfire_airbases/8/43/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/101.png rename to shared_files/aryaos/calfire_airbases/8/43/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/102.png b/shared_files/aryaos/calfire_airbases/8/43/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/102.png rename to shared_files/aryaos/calfire_airbases/8/43/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/103.png b/shared_files/aryaos/calfire_airbases/8/43/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/103.png rename to shared_files/aryaos/calfire_airbases/8/43/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/92.png b/shared_files/aryaos/calfire_airbases/8/43/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/92.png rename to shared_files/aryaos/calfire_airbases/8/43/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/93.png b/shared_files/aryaos/calfire_airbases/8/43/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/93.png rename to shared_files/aryaos/calfire_airbases/8/43/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/94.png b/shared_files/aryaos/calfire_airbases/8/43/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/94.png rename to shared_files/aryaos/calfire_airbases/8/43/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/95.png b/shared_files/aryaos/calfire_airbases/8/43/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/95.png rename to shared_files/aryaos/calfire_airbases/8/43/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/96.png b/shared_files/aryaos/calfire_airbases/8/43/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/96.png rename to shared_files/aryaos/calfire_airbases/8/43/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/97.png b/shared_files/aryaos/calfire_airbases/8/43/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/97.png rename to shared_files/aryaos/calfire_airbases/8/43/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/98.png b/shared_files/aryaos/calfire_airbases/8/43/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/98.png rename to shared_files/aryaos/calfire_airbases/8/43/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/43/99.png b/shared_files/aryaos/calfire_airbases/8/43/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/43/99.png rename to shared_files/aryaos/calfire_airbases/8/43/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/100.png b/shared_files/aryaos/calfire_airbases/8/44/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/100.png rename to shared_files/aryaos/calfire_airbases/8/44/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/101.png b/shared_files/aryaos/calfire_airbases/8/44/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/101.png rename to shared_files/aryaos/calfire_airbases/8/44/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/102.png b/shared_files/aryaos/calfire_airbases/8/44/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/102.png rename to shared_files/aryaos/calfire_airbases/8/44/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/103.png b/shared_files/aryaos/calfire_airbases/8/44/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/103.png rename to shared_files/aryaos/calfire_airbases/8/44/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/92.png b/shared_files/aryaos/calfire_airbases/8/44/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/92.png rename to shared_files/aryaos/calfire_airbases/8/44/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/93.png b/shared_files/aryaos/calfire_airbases/8/44/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/93.png rename to shared_files/aryaos/calfire_airbases/8/44/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/94.png b/shared_files/aryaos/calfire_airbases/8/44/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/94.png rename to shared_files/aryaos/calfire_airbases/8/44/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/95.png b/shared_files/aryaos/calfire_airbases/8/44/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/95.png rename to shared_files/aryaos/calfire_airbases/8/44/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/96.png b/shared_files/aryaos/calfire_airbases/8/44/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/96.png rename to shared_files/aryaos/calfire_airbases/8/44/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/97.png b/shared_files/aryaos/calfire_airbases/8/44/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/97.png rename to shared_files/aryaos/calfire_airbases/8/44/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/98.png b/shared_files/aryaos/calfire_airbases/8/44/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/98.png rename to shared_files/aryaos/calfire_airbases/8/44/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/44/99.png b/shared_files/aryaos/calfire_airbases/8/44/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/44/99.png rename to shared_files/aryaos/calfire_airbases/8/44/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/100.png b/shared_files/aryaos/calfire_airbases/8/45/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/100.png rename to shared_files/aryaos/calfire_airbases/8/45/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/101.png b/shared_files/aryaos/calfire_airbases/8/45/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/101.png rename to shared_files/aryaos/calfire_airbases/8/45/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/102.png b/shared_files/aryaos/calfire_airbases/8/45/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/102.png rename to shared_files/aryaos/calfire_airbases/8/45/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/103.png b/shared_files/aryaos/calfire_airbases/8/45/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/103.png rename to shared_files/aryaos/calfire_airbases/8/45/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/91.png b/shared_files/aryaos/calfire_airbases/8/45/91.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/91.png rename to shared_files/aryaos/calfire_airbases/8/45/91.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/92.png b/shared_files/aryaos/calfire_airbases/8/45/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/92.png rename to shared_files/aryaos/calfire_airbases/8/45/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/93.png b/shared_files/aryaos/calfire_airbases/8/45/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/93.png rename to shared_files/aryaos/calfire_airbases/8/45/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/94.png b/shared_files/aryaos/calfire_airbases/8/45/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/94.png rename to shared_files/aryaos/calfire_airbases/8/45/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/95.png b/shared_files/aryaos/calfire_airbases/8/45/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/95.png rename to shared_files/aryaos/calfire_airbases/8/45/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/96.png b/shared_files/aryaos/calfire_airbases/8/45/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/96.png rename to shared_files/aryaos/calfire_airbases/8/45/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/97.png b/shared_files/aryaos/calfire_airbases/8/45/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/97.png rename to shared_files/aryaos/calfire_airbases/8/45/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/98.png b/shared_files/aryaos/calfire_airbases/8/45/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/98.png rename to shared_files/aryaos/calfire_airbases/8/45/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/45/99.png b/shared_files/aryaos/calfire_airbases/8/45/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/45/99.png rename to shared_files/aryaos/calfire_airbases/8/45/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/100.png b/shared_files/aryaos/calfire_airbases/8/46/100.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/100.png rename to shared_files/aryaos/calfire_airbases/8/46/100.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/101.png b/shared_files/aryaos/calfire_airbases/8/46/101.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/101.png rename to shared_files/aryaos/calfire_airbases/8/46/101.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/102.png b/shared_files/aryaos/calfire_airbases/8/46/102.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/102.png rename to shared_files/aryaos/calfire_airbases/8/46/102.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/103.png b/shared_files/aryaos/calfire_airbases/8/46/103.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/103.png rename to shared_files/aryaos/calfire_airbases/8/46/103.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/91.png b/shared_files/aryaos/calfire_airbases/8/46/91.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/91.png rename to shared_files/aryaos/calfire_airbases/8/46/91.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/92.png b/shared_files/aryaos/calfire_airbases/8/46/92.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/92.png rename to shared_files/aryaos/calfire_airbases/8/46/92.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/93.png b/shared_files/aryaos/calfire_airbases/8/46/93.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/93.png rename to shared_files/aryaos/calfire_airbases/8/46/93.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/94.png b/shared_files/aryaos/calfire_airbases/8/46/94.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/94.png rename to shared_files/aryaos/calfire_airbases/8/46/94.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/95.png b/shared_files/aryaos/calfire_airbases/8/46/95.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/95.png rename to shared_files/aryaos/calfire_airbases/8/46/95.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/96.png b/shared_files/aryaos/calfire_airbases/8/46/96.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/96.png rename to shared_files/aryaos/calfire_airbases/8/46/96.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/97.png b/shared_files/aryaos/calfire_airbases/8/46/97.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/97.png rename to shared_files/aryaos/calfire_airbases/8/46/97.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/98.png b/shared_files/aryaos/calfire_airbases/8/46/98.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/98.png rename to shared_files/aryaos/calfire_airbases/8/46/98.png diff --git a/stage5-common/00-install/files/calfire_airbases/8/46/99.png b/shared_files/aryaos/calfire_airbases/8/46/99.png similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/8/46/99.png rename to shared_files/aryaos/calfire_airbases/8/46/99.png diff --git a/stage5-common/00-install/files/calfire_airbases/googlemaps.html b/shared_files/aryaos/calfire_airbases/googlemaps.html similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/googlemaps.html rename to shared_files/aryaos/calfire_airbases/googlemaps.html diff --git a/stage5-common/00-install/files/calfire_airbases/index.html b/shared_files/aryaos/calfire_airbases/index.html similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/index.html rename to shared_files/aryaos/calfire_airbases/index.html diff --git a/stage5-common/00-install/files/calfire_airbases/leaflet.html b/shared_files/aryaos/calfire_airbases/leaflet.html similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/leaflet.html rename to shared_files/aryaos/calfire_airbases/leaflet.html diff --git a/stage5-common/00-install/files/calfire_airbases/metadata.json b/shared_files/aryaos/calfire_airbases/metadata.json similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/metadata.json rename to shared_files/aryaos/calfire_airbases/metadata.json diff --git a/stage5-common/00-install/files/calfire_airbases/openlayers.html b/shared_files/aryaos/calfire_airbases/openlayers.html similarity index 100% rename from stage5-common/00-install/files/calfire_airbases/openlayers.html rename to shared_files/aryaos/calfire_airbases/openlayers.html diff --git a/stage3-wifi/00-install/files/comitup-callback.sh b/shared_files/aryaos/comitup-callback.sh similarity index 100% rename from stage3-wifi/00-install/files/comitup-callback.sh rename to shared_files/aryaos/comitup-callback.sh diff --git a/stage3-wifi/00-install/files/comitup.conf b/shared_files/aryaos/comitup.conf similarity index 98% rename from stage3-wifi/00-install/files/comitup.conf rename to shared_files/aryaos/comitup.conf index c1b603a..7b3d664 100644 --- a/stage3-wifi/00-install/files/comitup.conf +++ b/shared_files/aryaos/comitup.conf @@ -13,7 +13,7 @@ # up to four "n's" in the string. Similarly, the string "" # is replaced with the system hostname. # -# ap_name: aryaos- +# ap_name: AryaOS- # ap_password # diff --git a/stage3-wifi/00-install/files/comitup.json b/shared_files/aryaos/comitup.json similarity index 100% rename from stage3-wifi/00-install/files/comitup.json rename to shared_files/aryaos/comitup.json diff --git a/stage3-wifi/00-install/files/comitup.service b/shared_files/aryaos/comitup.service similarity index 100% rename from stage3-wifi/00-install/files/comitup.service rename to shared_files/aryaos/comitup.service diff --git a/shared_files/aryaos/dump978-master.zip b/shared_files/aryaos/dump978-master.zip new file mode 100644 index 0000000..c9659ec Binary files /dev/null and b/shared_files/aryaos/dump978-master.zip differ diff --git a/stage6-air/01-files/files/flightaware-apt-repository_1.2_all.deb b/shared_files/aryaos/flightaware-apt-repository_1.2_all.deb similarity index 100% rename from stage6-air/01-files/files/flightaware-apt-repository_1.2_all.deb rename to shared_files/aryaos/flightaware-apt-repository_1.2_all.deb diff --git a/stage3-base/00-install/files/get_throttled.sh b/shared_files/aryaos/get_throttled.sh similarity index 100% rename from stage3-base/00-install/files/get_throttled.sh rename to shared_files/aryaos/get_throttled.sh diff --git a/stage5-common/00-install/files/html/css/uikit-rtl.css b/shared_files/aryaos/html/css/uikit-rtl.css similarity index 100% rename from stage5-common/00-install/files/html/css/uikit-rtl.css rename to shared_files/aryaos/html/css/uikit-rtl.css diff --git a/stage5-common/00-install/files/html/css/uikit-rtl.min.css b/shared_files/aryaos/html/css/uikit-rtl.min.css similarity index 100% rename from stage5-common/00-install/files/html/css/uikit-rtl.min.css rename to shared_files/aryaos/html/css/uikit-rtl.min.css diff --git a/stage5-common/00-install/files/html/css/uikit.css b/shared_files/aryaos/html/css/uikit.css similarity index 100% rename from stage5-common/00-install/files/html/css/uikit.css rename to shared_files/aryaos/html/css/uikit.css diff --git a/stage5-common/00-install/files/html/css/uikit.min.css b/shared_files/aryaos/html/css/uikit.min.css similarity index 100% rename from stage5-common/00-install/files/html/css/uikit.min.css rename to shared_files/aryaos/html/css/uikit.min.css diff --git a/stage5-common/00-install/files/html/index.html b/shared_files/aryaos/html/index.html similarity index 100% rename from stage5-common/00-install/files/html/index.html rename to shared_files/aryaos/html/index.html diff --git a/stage5-common/00-install/files/html/index2.html b/shared_files/aryaos/html/index2.html similarity index 86% rename from stage5-common/00-install/files/html/index2.html rename to shared_files/aryaos/html/index2.html index 4d920d0..996d609 100644 --- a/stage5-common/00-install/files/html/index2.html +++ b/shared_files/aryaos/html/index2.html @@ -36,8 +36,8 @@

AryaOS

@@ -46,8 +46,8 @@

AryaOS

diff --git a/stage5-common/00-install/files/html/js/uikit-icons.js b/shared_files/aryaos/html/js/uikit-icons.js similarity index 100% rename from stage5-common/00-install/files/html/js/uikit-icons.js rename to shared_files/aryaos/html/js/uikit-icons.js diff --git a/stage5-common/00-install/files/html/js/uikit-icons.min.js b/shared_files/aryaos/html/js/uikit-icons.min.js similarity index 100% rename from stage5-common/00-install/files/html/js/uikit-icons.min.js rename to shared_files/aryaos/html/js/uikit-icons.min.js diff --git a/stage5-common/00-install/files/html/js/uikit.js b/shared_files/aryaos/html/js/uikit.js similarity index 100% rename from stage5-common/00-install/files/html/js/uikit.js rename to shared_files/aryaos/html/js/uikit.js diff --git a/stage5-common/00-install/files/html/js/uikit.min.js b/shared_files/aryaos/html/js/uikit.min.js similarity index 100% rename from stage5-common/00-install/files/html/js/uikit.min.js rename to shared_files/aryaos/html/js/uikit.min.js diff --git a/stage6-air/04-aryaair/files/tar1090-install.sh b/shared_files/aryaos/install-tar1090.sh old mode 100644 new mode 100755 similarity index 91% rename from stage6-air/04-aryaair/files/tar1090-install.sh rename to shared_files/aryaos/install-tar1090.sh index 092e3dd..2284a12 --- a/stage6-air/04-aryaair/files/tar1090-install.sh +++ b/shared_files/aryaos/install-tar1090.sh @@ -7,7 +7,7 @@ set -e trap 'echo "[ERROR] Error in line $LINENO when executing: $BASH_COMMAND"' ERR renice 10 $$ -srcdir=/run/adsb +srcdir=/run/readsb repo="https://github.com/wiedehopf/tar1090" db_repo="https://github.com/wiedehopf/tar1090-db" @@ -58,7 +58,8 @@ if [[ -n "${packages[*]}" ]]; then fi echo "Installing required packages: ${packages[*]}" if ! apt-get install -y --no-install-suggests --no-install-recommends "${packages[@]}"; then - apt-get update || true + # Disabled by gba. This should happen earlier in the Ansible run. + # apt-get update || true apt-get install -y --no-install-suggests --no-install-recommends "${packages[@]}" || true fi hash -r || true @@ -114,7 +115,6 @@ function getGIT() { fi rm -rf "$tmp" "$tmp.folder"; popd > /dev/null; return 1; } - function revision() { git rev-parse --short HEAD 2>/dev/null || echo "$RANDOM-$RANDOM" } @@ -145,7 +145,7 @@ if [[ "$1" == "test" ]] || [[ -n "$git_source" ]]; then cp -r ./* "$gpath/git" fi cd "$gpath/git" - TAR_VERSION="$(date +%s)_${RANDOM}${RANDOM}" + TAR_VERSION="$(cat version)_dirty" else VERSION_NEW=$(curl --silent --show-error "https://raw.githubusercontent.com/wiedehopf/tar1090/master/version") if [[ "$(cat "$gpath/git/version" 2>/dev/null)" != "$VERSION_NEW" ]]; then @@ -158,39 +158,38 @@ else echo "Unable to download files, exiting! (Maybe try again?)" exit 1 fi - TAR_VERSION="$(revision)" + TAR_VERSION="$(cat version)" fi -srcdir=/run/adsb - -# if [[ -n $1 ]] && [ "$1" != "test" ] ; then -# srcdir=$1 -# elif [ -f /etc/default/tar1090_instances ]; then -# true -# elif [[ -f /run/dump1090-fa/aircraft.json ]] ; then -# srcdir=/run/dump1090-fa -# elif [[ -f /run/readsb/aircraft.json ]]; then -# srcdir=/run/readsb -# elif [[ -f /run/adsbexchange-feed/aircraft.json ]]; then -# srcdir=/run/adsbexchange-feed -# elif [[ -f /run/dump1090/aircraft.json ]]; then -# srcdir=/run/dump1090 -# elif [[ -f /run/dump1090-mutability/aircraft.json ]]; then -# srcdir=/run/dump1090-mutability -# elif [[ -f /run/skyaware978/aircraft.json ]]; then -# srcdir=/run/skyaware978 -# elif [[ -f /run/shm/aircraft.json ]]; then -# srcdir=/run/shm -# else -# echo -------------- -# echo FATAL: could not find aircraft.json in any of the usual places! -# echo "checked these: /run/readsb /run/dump1090-fa /run/dump1090 /run/dump1090-mutability /run/adsbexchange-feed /run/skyaware978" -# echo -------------- -# echo "You need to have a decoder installed first, readsb is recommended:" -# echo "https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-readsb" -# echo -------------- -# exit 1 -# fi + +if [[ -n $1 ]] && [ "$1" != "test" ] ; then + srcdir=$1 +elif [ -f /etc/default/tar1090_instances ]; then + true +elif [[ -f /run/dump1090-fa/aircraft.json ]] ; then + srcdir=/run/dump1090-fa +elif [[ -f /run/readsb/aircraft.json ]]; then + srcdir=/run/readsb +elif [[ -f /run/adsbexchange-feed/aircraft.json ]]; then + srcdir=/run/adsbexchange-feed +elif [[ -f /run/dump1090/aircraft.json ]]; then + srcdir=/run/dump1090 +elif [[ -f /run/dump1090-mutability/aircraft.json ]]; then + srcdir=/run/dump1090-mutability +elif [[ -f /run/skyaware978/aircraft.json ]]; then + srcdir=/run/skyaware978 +elif [[ -f /run/shm/aircraft.json ]]; then + srcdir=/run/shm +else + echo -------------- + echo FATAL: could not find aircraft.json in any of the usual places! + echo "checked these: /run/readsb /run/dump1090-fa /run/dump1090 /run/dump1090-mutability /run/adsbexchange-feed /run/skyaware978" + echo -------------- + echo "You need to have a decoder installed first, readsb is recommended:" + echo "https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-readsb" + echo -------------- + exit 1 +fi if [[ -n $2 ]]; then instances="$srcdir $2" @@ -329,7 +328,7 @@ do dir=$(pwd) cd "$TMP" - sed -i -e "s/tar1090 on github/tar1090 on github ($(date +%y%m%d))/" index.html + sed -i -e "s/tar1090 on github/tar1090 on github (${TAR_VERSION})/" index.html "$gpath/git/cachebust.sh" "$gpath/git/cachebust.list" "$TMP" @@ -456,10 +455,10 @@ if [[ $lighttpd == yes ]]; then fi fi -# if useSystemd && systemctl show lighttpd 2>/dev/null | grep -qs -F -e 'UnitFileState=enabled' -e 'ActiveState=active'; then -# echo "Restarting lighttpd ..." -# systemctl restart lighttpd || ! pgrep systemd -# fi +if useSystemd && systemctl show lighttpd 2>/dev/null | grep -qs -F -e 'UnitFileState=enabled' -e 'ActiveState=active'; then + echo "Restarting lighttpd ..." + systemctl restart lighttpd || ! pgrep systemd +fi echo -------------- diff --git a/stage3-base/00-install/files/install_ZT.sh b/shared_files/aryaos/install_zt.sh similarity index 99% rename from stage3-base/00-install/files/install_ZT.sh rename to shared_files/aryaos/install_zt.sh index af2cf15..d3bd196 100755 --- a/stage3-base/00-install/files/install_ZT.sh +++ b/shared_files/aryaos/install_zt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# AryaOS install_ZT.sh +# AryaOS install_zt.sh <> $AOS_CONFIG fi -if [ ! grep -qs -e 'NODE_ID' $AOS_CONFIG ]; then - logger "Adding empty NODE_ID to $AOS_CONFIG" + +# Doesn't work: +# if grep -qs -e 'NODE_ID' $AOS_CONFIG; then +grep -qs -e 'NODE_ID' $AOS_CONFIG +retVal=$? +if [ $retVal -ne 0 ]; then + echo "Adding empty NODE_ID to $AOS_CONFIG" echo 'NODE_ID=""' >> $AOS_CONFIG fi -if [ -z "$NODE_ID" ]; then +if [ -z "${NODE_ID}" ]; then if [ -f /sys/firmware/devicetree/base/serial-number ]; then - NEW_NODE_ID=$(cat /sys/firmware/devicetree/base/serial-number) + echo "Using serial number to generate NODE_ID." + # Remove Null at end of serial number. + NEW_NODE_ID="$(tr -d '\000' < /sys/firmware/devicetree/base/serial-number)" else - NEW_NODE_ID=$(python3 -c "import uuid;print(str(uuid.uuid4()).upper())") + echo "Using UUID to generate NODE_ID." + NEW_NODE_ID="$(python3 -c "import uuid;print(str(uuid.uuid4()).upper())")" fi sed --follow-symlinks -i -E -e "s/NODE_ID.*/NODE_ID=$NEW_NODE_ID/" $AOS_CONFIG - logger "AryaOS NODE_ID is now set to: $NEW_NODE_ID" + echo "AryaOS NODE_ID is now set to: $NEW_NODE_ID" else exit 64 fi \ No newline at end of file diff --git a/stage5-common/00-install/files/wifi-nuke.py b/shared_files/aryaos/wifi-nuke.py similarity index 100% rename from stage5-common/00-install/files/wifi-nuke.py rename to shared_files/aryaos/wifi-nuke.py diff --git a/stage5-common/00-install/files/AryaOS_flows.json b/shared_files/node-red/AryaOS_flows.json similarity index 80% rename from stage5-common/00-install/files/AryaOS_flows.json rename to shared_files/node-red/AryaOS_flows.json index a39bfbd..a5cc0db 100644 --- a/stage5-common/00-install/files/AryaOS_flows.json +++ b/shared_files/node-red/AryaOS_flows.json @@ -150,6 +150,234 @@ "w": 392, "h": 162 }, + { + "id": "fb90e60944764ed9", + "type": "group", + "z": "94cf869050128770", + "name": "GPS Fix Dashboard Item", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "69bd079907c39f3c", + "73eb77cde2c7a709", + "7c69f96954e99a9b", + "de2c209dbe934060", + "f20627a1cbc79171", + "1190f05a50aad89c", + "43958e20b7e848a3" + ], + "x": 34, + "y": 379, + "w": 692, + "h": 162 + }, + { + "id": "a1d4fe25968a5368", + "type": "group", + "z": "94cf869050128770", + "name": "Throttled Status", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "67c1aa629a2e95af", + "4f64ec7db13ee424", + "4338acd2934924cc" + ], + "x": 494, + "y": 559, + "w": 632, + "h": 109.5 + }, + { + "id": "45da34b7e4bdb957", + "type": "group", + "z": "94cf869050128770", + "name": "", + "style": { + "fill": "#bfdbef", + "label": true + }, + "nodes": [ + "095368571cbf1fcf", + "c82e38d047199cb5", + "16d10d070ec070d9", + "20787a00729ffe5f", + "c1b4f4996f5aa122", + "7750039932acdcc7", + "e0d87a55d461c609", + "8db81499fdb5170a", + "681d2876a7db4f51", + "d85368cd75bb347e" + ], + "x": 34, + "y": 19, + "w": 652, + "h": 202 + }, + { + "id": "75d810e2c34e3c4f", + "type": "group", + "z": "94cf869050128770", + "name": "SDR Lookup", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "24d11b12327e6147", + "b36b3af7a720fa09", + "c694287e0ecfdb11", + "ab8919275dc5a1bb", + "65b80260e6a12016" + ], + "x": 34, + "y": 239, + "w": 592, + "h": 122 + }, + { + "id": "e3b3a9c137f6b1a8", + "type": "group", + "z": "94cf869050128770", + "name": "Uptime", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "16419a36256c9583", + "b1d1259dd556c68a", + "267687b40c52261e" + ], + "x": 34, + "y": 571.5, + "w": 452, + "h": 97 + }, + { + "id": "e165fa1b9bca5292", + "type": "group", + "z": "76732e91104cd622", + "name": "aircraft.json", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "5f6eab2d3d6ad9be", + "64fa2c00f63bdd53", + "b068a436f07cc0bd", + "99dfc7e97f5f8d47", + "b3d1b7bf5a4edba2", + "ce3be08760e15920", + "65a40de620905bad", + "573961361f4ac80b", + "61a91ec3d8b3f82b" + ], + "x": 34, + "y": 419, + "w": 682, + "h": 242 + }, + { + "id": "265b840ea6186ecf", + "type": "group", + "z": "76732e91104cd622", + "style": { + "stroke": "#999999", + "stroke-opacity": "1", + "fill": "none", + "fill-opacity": "1", + "label": true, + "label-position": "nw", + "color": "#a4a4a4" + }, + "nodes": [ + "a5dbb71f6d17579d", + "4aa3f8001760c96a", + "e0a7e9ef71a6f0e8", + "bd6f79df66f3f373", + "089a5c1ffeafe91b", + "58edafa9ab997436" + ], + "x": 54, + "y": 759, + "w": 452, + "h": 262 + }, + { + "id": "1d17f399c2310113", + "type": "group", + "z": "94cf869050128770", + "name": "Hostname", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "4a87ab6388bffac2", + "1fca29d62080fdd9", + "5d6ab3c272199b94", + "dc3fd8b497972cae", + "2d5d9381afea8c59", + "6ee20da0ae45fefa" + ], + "x": 554, + "y": 679, + "w": 912, + "h": 122 + }, + { + "id": "d34772b1b10233f2", + "type": "group", + "z": "94cf869050128770", + "name": "QR Code", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "9f8119755cf73778", + "a1642742e713d559", + "8a9319936729c649", + "cbbe264f84b53680" + ], + "x": 744, + "y": 439, + "w": 582, + "h": 82 + }, + { + "id": "3de15a4313928391", + "type": "group", + "z": "94cf869050128770", + "name": "Docker", + "style": { + "fill": "#bfdbef", + "label": true, + "color": "#000000" + }, + "nodes": [ + "808f9f656a06999e", + "b2825e8d13e21f82", + "d033dfa14fa3a005" + ], + "x": 34, + "y": 691.5, + "w": 472, + "h": 97 + }, { "id": "edc83286b603d84a", "type": "ui_tab", @@ -267,17 +495,6 @@ "collapse": false, "className": "" }, - { - "id": "c5f1b8aa.45bc08", - "type": "ui_group", - "name": "Actions", - "tab": "3883fa5a5cd96180", - "order": 1, - "disp": true, - "width": "12", - "collapse": false, - "className": "" - }, { "id": "9a96a8b1.92db78", "type": "ui_group", @@ -341,7 +558,7 @@ { "id": "ea29ae5e99fd702f", "type": "ui_group", - "name": "ADSBCOT Config", + "name": "adsbcot Config", "tab": "1a1f481e736717f6", "order": 3, "disp": true, @@ -367,7 +584,7 @@ "tab": "3883fa5a5cd96180", "order": 3, "disp": true, - "width": "12", + "width": "10", "collapse": false, "className": "" }, @@ -403,7 +620,7 @@ { "id": "3883fa5a5cd96180", "type": "ui_tab", - "name": "Control", + "name": "Admin", "icon": "dashboard", "order": 4, "disabled": false, @@ -429,40 +646,10 @@ "target": "newtab", "order": 2 }, - { - "id": "43a780b8e2137467", - "type": "ui_spacer", - "z": "f83d0c6d58d0338c", - "name": "spacer", - "group": "d39a9c40a9e39a06", - "order": 3, - "width": 4, - "height": 1 - }, - { - "id": "1bff3d2d70ac057f", - "type": "ui_spacer", - "z": "f83d0c6d58d0338c", - "name": "spacer", - "group": "d39a9c40a9e39a06", - "order": 7, - "width": 3, - "height": 1 - }, - { - "id": "1270773641509afd", - "type": "ui_spacer", - "z": "f83d0c6d58d0338c", - "name": "spacer", - "group": "d39a9c40a9e39a06", - "order": 10, - "width": 6, - "height": 1 - }, { "id": "5fe7b630bc270f5d", "type": "ui_group", - "name": "LINCOT", + "name": "lincot", "tab": "1a1f481e736717f6", "order": 4, "disp": true, @@ -473,7 +660,7 @@ { "id": "fa4e075e1fa30638", "type": "ui_group", - "name": "Air", + "name": "Status", "tab": "edc83286b603d84a", "order": 1, "disp": true, @@ -484,7 +671,7 @@ { "id": "f9087e66bb4cd9b2", "type": "ui_group", - "name": "System", + "name": "Control", "tab": "edc83286b603d84a", "order": 2, "disp": true, @@ -521,6 +708,37 @@ "width": "8", "height": "1" }, + { + "id": "01bbd1a84045b069", + "type": "ui_group", + "name": "Command Logs", + "tab": "3883fa5a5cd96180", + "order": 2, + "disp": true, + "width": "10", + "collapse": false, + "className": "" + }, + { + "id": "59dd599c93f49d9b", + "type": "ui_spacer", + "z": "1d5c7046712ea9d2", + "name": "spacer", + "group": "d39a9c40a9e39a06", + "order": 2, + "width": 2, + "height": 1 + }, + { + "id": "087bafabfc3d14f1", + "type": "ui_spacer", + "z": "1d5c7046712ea9d2", + "name": "spacer", + "group": "d39a9c40a9e39a06", + "order": 4, + "width": 2, + "height": 1 + }, { "id": "683a2b05.736204", "type": "ui_button", @@ -528,7 +746,7 @@ "g": "bd418afe09349324", "name": "", "group": "d39a9c40a9e39a06", - "order": 1, + "order": 3, "width": 4, "height": 1, "passthru": false, @@ -577,7 +795,7 @@ "g": "bd418afe09349324", "name": "", "group": "d39a9c40a9e39a06", - "order": 2, + "order": 1, "width": 4, "height": 1, "passthru": false, @@ -623,27 +841,27 @@ "id": "08b06bdbca165793", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 1, + "name": "Restart adsbcot", + "group": "f9087e66bb4cd9b2", + "order": 11, "width": 4, "height": 1, "passthru": false, - "label": "Restart ADSBCOT", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "ADSBCOT", + "payload": "adsbcot", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", - "x": 190, - "y": 40, + "x": 430, + "y": 620, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, @@ -653,15 +871,15 @@ "z": "1d5c7046712ea9d2", "g": "bd418afe09349324", "name": "", - "group": "d39a9c40a9e39a06", - "order": 6, - "width": 3, + "group": "f9087e66bb4cd9b2", + "order": 7, + "width": 4, "height": 1, "passthru": false, "label": "Reset WiFi", "tooltip": "", - "color": "", - "bgcolor": "orange", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "comitup", @@ -706,27 +924,27 @@ "id": "f37f9b80fb0791de", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 16, - "width": 4, + "name": "Restart dump1090-fa", + "group": "f9087e66bb4cd9b2", + "order": 21, + "width": 3, "height": 1, "passthru": false, - "label": "Restart dump1090-fa", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump1090-fa", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", - "x": 180, - "y": 240, + "x": 240, + "y": 880, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, @@ -734,158 +952,74 @@ "id": "87d746e00381cae2", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 19, + "name": "Restart dump978-fa", + "group": "f9087e66bb4cd9b2", + "order": 37, "width": 4, "height": 1, "passthru": false, - "label": "Restart dump978-fa", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump978-fa", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", "x": 180, - "y": 280, + "y": 980, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, { - "id": "6fc81090ee2796ba", + "id": "88eaf8eb64d89ff4", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 4, - "width": 3, + "name": "Disable adsbcot", + "group": "f9087e66bb4cd9b2", + "order": 10, + "width": 2, "height": 1, "passthru": false, - "label": "Enable WiFi", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "comitup", + "payload": "adsbcot", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 290, - "y": 800, + "x": 430, + "y": 580, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, { - "id": "35db67c1c93d5f7a", - "type": "ui_button", + "id": "3493a1a21d11eab7", + "type": "ui_template", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 4, - "width": 4, - "height": 1, - "passthru": false, - "label": "Restart AISCOT", - "tooltip": "", - "color": "", - "bgcolor": "", + "group": "01bbd1a84045b069", + "name": "Command STDOUT", + "order": 3, + "width": 10, + "height": 5, + "format": "Command STDOUT:\n
\n
\n", + "storeOutMessages": false, + "fwdInMessages": true, + "resendOnRefresh": false, + "templateScope": "local", "className": "", - "icon": "", - "payload": "AISCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 200, - "y": 80, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "e8fb5bb0a8855bb9", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 22, - "width": 4, - "height": 1, - "passthru": false, - "label": "Restart gpsd", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "lincot", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 210, - "y": 320, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "88eaf8eb64d89ff4", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 3, - "width": 4, - "height": 1, - "passthru": false, - "label": "Disable ADSBCOT", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "ADSBCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 250, - "y": 460, - "wires": [ - [ - "08bbb4b6c1e5af69" - ] - ] - }, - { - "id": "3493a1a21d11eab7", - "type": "ui_template", - "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "name": "Control stdout", - "order": 11, - "width": 12, - "height": 5, - "format": "
\n", - "storeOutMessages": false, - "fwdInMessages": true, - "resendOnRefresh": false, - "templateScope": "local", - "className": "", - "x": 1340, + "x": 1360, "y": 440, "wires": [ [] @@ -910,60 +1044,22 @@ ] ] }, - { - "id": "08bbb4b6c1e5af69", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "msg.cmds = [\"disable\", \"stop\"]\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 480, - "y": 580, - "wires": [ - [ - "892008ebaff339b8" - ] - ] - }, - { - "id": "a903f3dcc9380af0", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "msg.cmds = [\"enable\", \"start\"]\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 520, - "y": 960, - "wires": [ - [ - "892008ebaff339b8" - ] - ] - }, { "id": "6949a7f7b06e7070", "type": "ui_template", "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "name": "Control stderr", - "order": 12, - "width": 12, + "group": "01bbd1a84045b069", + "name": "Command STDERR", + "order": 4, + "width": 10, "height": 5, - "format": "
\n", + "format": "Command STDERR:\n
\n
\n", "storeOutMessages": false, "fwdInMessages": true, "resendOnRefresh": false, "templateScope": "local", "className": "", - "x": 1340, + "x": 1360, "y": 480, "wires": [ [] @@ -973,20 +1069,20 @@ "id": "3e098904e91c0153", "type": "ui_text", "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "order": 8, - "width": 12, + "group": "01bbd1a84045b069", + "order": 1, + "width": 10, "height": 1, "name": "", - "label": "Last cmd", + "label": "Last Command", "format": "\"{{msg.payload}}\"", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Lucida Sans Typewriter,Lucida Console,Monaco,monospace", "fontSize": 16, "color": "#000000", - "x": 1100, + "x": 1120, "y": 380, "wires": [] }, @@ -994,9 +1090,9 @@ "id": "90ed4f84f5e592ba", "type": "ui_text", "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "order": 9, - "width": 6, + "group": "01bbd1a84045b069", + "order": 2, + "width": 10, "height": 1, "name": "", "label": "Exit Code", @@ -1042,15 +1138,16 @@ "id": "384961823b4116f8", "type": "function", "z": "1d5c7046712ea9d2", - "name": "set cmds", + "name": "Set restart CMDS", "func": "msg.cmds = [\"restart\"]\nreturn msg;", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 460, - "y": 180, + "x": 470, + "y": 480, "wires": [ [ "892008ebaff339b8" @@ -1061,27 +1158,27 @@ "id": "3f668133edf0f84f", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 2, + "name": "Enable adsbcot", + "group": "f9087e66bb4cd9b2", + "order": 12, "width": 4, "height": 1, "passthru": false, - "label": "Enable ADSBCOT", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "ADSBCOT", + "payload": "adsbcot", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 270, - "y": 840, + "x": 430, + "y": 540, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, @@ -1089,27 +1186,27 @@ "id": "cbbce818d3e35f27", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 18, - "width": 4, + "name": "Disable dump1090-fa", + "group": "f9087e66bb4cd9b2", + "order": 20, + "width": 2, "height": 1, "passthru": false, - "label": "Disable dump1090-fa", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump1090-fa", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", "x": 240, - "y": 660, + "y": 840, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, @@ -1117,27 +1214,27 @@ "id": "a89b330a230704e0", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 17, - "width": 4, + "name": "Enable dump1090-fa", + "group": "f9087e66bb4cd9b2", + "order": 22, + "width": 3, "height": 1, "passthru": false, - "label": "Enable dump1090-fa", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump1090-fa", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 260, - "y": 1040, + "x": 240, + "y": 920, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, @@ -1145,27 +1242,27 @@ "id": "df17c4d78bfccd39", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 21, - "width": 4, + "name": "Disable dump978-fa", + "group": "f9087e66bb4cd9b2", + "order": 36, + "width": 2, "height": 1, "passthru": false, - "label": "Disable dump978-fa", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump978-fa", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 240, - "y": 700, + "x": 180, + "y": 1060, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, @@ -1173,546 +1270,734 @@ "id": "6f76752d1b604a7a", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 20, + "name": "Enable dump978-fa", + "group": "f9087e66bb4cd9b2", + "order": 38, "width": 4, "height": 1, "passthru": false, - "label": "Enable dump978-fa", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", "payload": "dump978-fa", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 270, - "y": 1080, + "x": 190, + "y": 1020, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, { - "id": "ca872d53fb7f1c07", + "id": "4507524764f2e670", "type": "ui_button", "z": "1d5c7046712ea9d2", "name": "", - "group": "c5f1b8aa.45bc08", - "order": 24, - "width": 4, + "group": "f9087e66bb4cd9b2", + "order": 6, + "width": 2, "height": 1, "passthru": false, - "label": "Disable gpsd", + "label": "Disable WiFi", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "gpsd", + "payload": "", "payloadType": "str", "topic": "", "topicType": "str", - "x": 270, - "y": 740, + "x": 610, + "y": 260, "wires": [ [ - "08bbb4b6c1e5af69" + "f8a415dbee252311" ] ] }, { - "id": "a626a2fb10efab5a", - "type": "ui_button", + "id": "f8a415dbee252311", + "type": "function", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 23, - "width": 4, - "height": 1, - "passthru": false, - "label": "Enable gpsd", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "gpsd", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 290, - "y": 1120, + "name": "set cmds", + "func": "node.send({ \"payload\": \"sudo /bin/systemctl disable comitup\" })\nnode.send({ \"payload\": \"sudo /bin/systemctl stop comitup\" })\nnode.send({ \"payload\": \"/usr/local/sbin/wifi-nuke.py\" })\nnode.send({ \"payload\": \"sudo /usr/bin/nmcli device disconnect wlan0\" })\n", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 760, + "y": 260, "wires": [ [ - "a903f3dcc9380af0" + "89b46799e22ef74c", + "3e098904e91c0153" ] ] }, { - "id": "dc0e12826769d931", - "type": "ui_button", + "id": "3880190e670fb806", + "type": "debug", + "z": "1d5c7046712ea9d2", + "name": "debug 6", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1100, + "y": 520, + "wires": [] + }, + { + "id": "89b46799e22ef74c", + "type": "exec", "z": "1d5c7046712ea9d2", + "command": "", + "addpay": "payload", + "append": "", + "useSpawn": "", + "timer": "", + "winHide": false, "name": "", - "group": "c5f1b8aa.45bc08", - "order": 12, - "width": 4, + "x": 1090, + "y": 440, + "wires": [ + [ + "3493a1a21d11eab7" + ], + [ + "6949a7f7b06e7070" + ], + [ + "90ed4f84f5e592ba", + "05b15b7858e7cbca" + ] + ] + }, + { + "id": "191a64ffb1ef6aac", + "type": "link in", + "z": "1d5c7046712ea9d2", + "name": "Control In", + "links": [ + "bb55ecc1c7a7da19" + ], + "x": 825, + "y": 340, + "wires": [ + [ + "89b46799e22ef74c", + "3e098904e91c0153" + ] + ] + }, + { + "id": "6b7e442910d1d689", + "type": "function", + "z": "1d5c7046712ea9d2", + "name": "Restart Daemons", + "func": "const daemons = [\"adsbcot\", \"lincot\"];\nlet daemon\nfor (daemon of daemons) {\n node.send({ \"payload\": daemon})\n}", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 270, + "y": 480, + "wires": [ + [ + "384961823b4116f8" + ] + ] + }, + { + "id": "af90dbace757338b", + "type": "link in", + "z": "1d5c7046712ea9d2", + "name": "Control systemctl In", + "links": [ + "7ec81fe075691fa0" + ], + "x": 145, + "y": 480, + "wires": [ + [ + "6b7e442910d1d689" + ] + ] + }, + { + "id": "05b15b7858e7cbca", + "type": "link out", + "z": "1d5c7046712ea9d2", + "name": "Exec Out", + "mode": "link", + "links": [ + "4317408c7b784c0b" + ], + "x": 1205, + "y": 280, + "wires": [] + }, + { + "id": "37f5c4d1bb24f9e6", + "type": "ui_button", + "z": "1d5c7046712ea9d2", + "name": "Restart readsb", + "group": "f9087e66bb4cd9b2", + "order": 17, + "width": 3, "height": 1, "passthru": false, - "label": "Disable LINCOT", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "LINCOT", + "payload": "readsb", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 260, - "y": 540, + "x": 340, + "y": 780, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, { - "id": "22728d91b6fa7e95", + "id": "ed16625464077060", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 11, - "width": 4, + "name": "Disable readsb", + "group": "f9087e66bb4cd9b2", + "order": 16, + "width": 2, "height": 1, "passthru": false, - "label": "Enable LINCOT", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "LINCOT", + "payload": "readsb", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 280, - "y": 920, + "x": 340, + "y": 740, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, { - "id": "4507524764f2e670", + "id": "7a51c3912e23af57", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 5, + "name": "Enable readsb", + "group": "f9087e66bb4cd9b2", + "order": 18, "width": 3, "height": 1, "passthru": false, - "label": "Disable WiFi", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "", + "payload": "readsb", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 270, - "y": 400, + "x": 340, + "y": 700, "wires": [ [ - "f8a415dbee252311" + "ec8563d3c093ce78" ] ] }, { - "id": "f8a415dbee252311", + "id": "ec8563d3c093ce78", "type": "function", "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "node.send({ \"payload\": \"sudo /bin/systemctl disable comitup\" })\nnode.send({ \"payload\": \"sudo /bin/systemctl stop comitup\" })\nnode.send({ \"payload\": \"/usr/local/sbin/wifi-nuke.py\" })\nnode.send({ \"payload\": \"sudo /usr/bin/nmcli device disconnect wlan0\" })\n", + "name": "Set CMDS", + "func": "let cmds = \"\"\n\nswitch (msg.topic) {\n case \"enable\":\n cmds = [\"enable\", \"start\"]\n break\n case \"disable\":\n cmds = [\"disable\", \"stop\"]\n break\n case \"restart\":\n cmds = [\"restart\"]\n break\n default:\n break\n}\n\n\nmsg.cmds = cmds\nreturn msg;", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 460, - "y": 400, + "x": 570, + "y": 1040, "wires": [ [ - "89b46799e22ef74c", - "3e098904e91c0153" + "892008ebaff339b8" ] ] }, { - "id": "3880190e670fb806", - "type": "debug", + "id": "8c1bc2c88f0deda1", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "debug 6", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1100, - "y": 520, - "wires": [] + "name": "Restart Node-RED", + "group": "f9087e66bb4cd9b2", + "order": 25, + "width": 4, + "height": 1, + "passthru": false, + "label": "Restart", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "nodered", + "payloadType": "str", + "topic": "restart", + "topicType": "str", + "x": 230, + "y": 1120, + "wires": [ + [ + "ec8563d3c093ce78" + ] + ] }, { - "id": "89b46799e22ef74c", - "type": "exec", + "id": "f752b25886f124fc", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "command": "", - "addpay": "payload", - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 1090, - "y": 440, + "name": "Disable Node-RED", + "group": "f9087e66bb4cd9b2", + "order": 24, + "width": 2, + "height": 1, + "passthru": false, + "label": "Disable", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "nodered", + "payloadType": "str", + "topic": "disable", + "topicType": "str", + "x": 230, + "y": 1200, "wires": [ [ - "3493a1a21d11eab7" - ], - [ - "6949a7f7b06e7070" - ], - [ - "90ed4f84f5e592ba", - "05b15b7858e7cbca" + "ec8563d3c093ce78" ] ] }, { - "id": "191a64ffb1ef6aac", - "type": "link in", + "id": "4c6c8944f810f549", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "Control In", - "links": [ - "bb55ecc1c7a7da19" - ], - "x": 825, - "y": 340, + "name": "Enable Node-RED", + "group": "f9087e66bb4cd9b2", + "order": 26, + "width": 4, + "height": 1, + "passthru": false, + "label": "Enable", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "nodered", + "payloadType": "str", + "topic": "enable", + "topicType": "str", + "x": 230, + "y": 1160, "wires": [ [ - "89b46799e22ef74c", - "3e098904e91c0153" + "ec8563d3c093ce78" ] ] }, { - "id": "6b7e442910d1d689", - "type": "function", + "id": "49dd21993eb40575", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "Restart Daemons", - "func": "const daemons = [\"adsbcot\", \"lincot\"];\nlet daemon\nfor (daemon of daemons) {\n node.send({ \"payload\": daemon})\n}", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 590, - "y": 40, + "name": "Restart lincot", + "group": "f9087e66bb4cd9b2", + "order": 29, + "width": 4, + "height": 1, + "passthru": false, + "label": "Restart", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "lincot", + "payloadType": "str", + "topic": "restart", + "topicType": "str", + "x": 260, + "y": 1280, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, { - "id": "af90dbace757338b", - "type": "link in", + "id": "1705375d70d3114e", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "Control systemctl In", - "links": [ - "7ec81fe075691fa0" - ], - "x": 465, - "y": 40, + "name": "Disable lincot", + "group": "f9087e66bb4cd9b2", + "order": 28, + "width": 2, + "height": 1, + "passthru": false, + "label": "Disable", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "lincot", + "payloadType": "str", + "topic": "disable", + "topicType": "str", + "x": 260, + "y": 1360, "wires": [ [ - "6b7e442910d1d689" + "ec8563d3c093ce78" ] ] }, { - "id": "05b15b7858e7cbca", - "type": "link out", + "id": "d7a8d6efef1f9e28", + "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "Exec Out", - "mode": "link", - "links": [ - "4317408c7b784c0b" - ], - "x": 1205, - "y": 280, - "wires": [] + "name": "Enable lincot", + "group": "f9087e66bb4cd9b2", + "order": 30, + "width": 4, + "height": 1, + "passthru": false, + "label": "Enable", + "tooltip": "", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "lincot", + "payloadType": "str", + "topic": "enable", + "topicType": "str", + "x": 260, + "y": 1320, + "wires": [ + [ + "ec8563d3c093ce78" + ] + ] }, { - "id": "37f5c4d1bb24f9e6", + "id": "b9352e86c36440c2", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 13, + "name": "Restart gpsd", + "group": "f9087e66bb4cd9b2", + "order": 33, "width": 4, "height": 1, "passthru": false, - "label": "Restart readsb", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "readsb", + "payload": "gpsd", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", - "x": 200, - "y": 200, + "x": 330, + "y": 1420, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, { - "id": "ed16625464077060", + "id": "5924d9e81efa421c", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 15, - "width": 4, + "name": "Disable gpsd", + "group": "f9087e66bb4cd9b2", + "order": 32, + "width": 2, "height": 1, "passthru": false, - "label": "Disable readsb", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "readsb", + "payload": "gpsd", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 260, - "y": 620, + "x": 330, + "y": 1500, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, { - "id": "7a51c3912e23af57", + "id": "0b1ad5c1909d96d3", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 14, + "name": "Enable gpsd", + "group": "f9087e66bb4cd9b2", + "order": 34, "width": 4, "height": 1, "passthru": false, - "label": "Enable readsb", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "readsb", + "payload": "gpsd", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 280, - "y": 1000, + "x": 330, + "y": 1460, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, { - "id": "e45747124cbea940", + "id": "e8d964e7b344a009", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 10, + "name": "Restart aiscot", + "group": "f9087e66bb4cd9b2", + "order": 41, "width": 4, "height": 1, "passthru": false, - "label": "Restart LINCOT", + "label": "Restart", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "LINCOT", + "payload": "aiscot", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", - "x": 200, - "y": 120, + "x": 380, + "y": 1600, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, { - "id": "b5d220ded35ec9f1", + "id": "cdf495d24dca37ad", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 7, - "width": 4, + "name": "Disable aiscot", + "group": "f9087e66bb4cd9b2", + "order": 40, + "width": 2, "height": 1, "passthru": false, - "label": "Restart DroneCOT", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "DroneCOT", + "payload": "aiscot", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 190, - "y": 160, + "x": 380, + "y": 1680, "wires": [ [ - "384961823b4116f8" + "ec8563d3c093ce78" ] ] }, { - "id": "8f20789e506e77c0", + "id": "b616c13f08bb9dc2", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 6, + "name": "Enable aiscot", + "group": "f9087e66bb4cd9b2", + "order": 42, "width": 4, "height": 1, "passthru": false, - "label": "Disable AISCOT", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", + "className": "", + "icon": "", + "payload": "aiscot", + "payloadType": "str", + "topic": "enable", + "topicType": "str", + "x": 380, + "y": 1640, + "wires": [ + [ + "ec8563d3c093ce78" + ] + ] + }, + { + "id": "d3d073a637fa7533", + "type": "ui_button", + "z": "1d5c7046712ea9d2", + "name": "Restart dronecot", + "group": "f9087e66bb4cd9b2", + "order": 45, + "width": 4, + "height": 1, + "passthru": false, + "label": "Restart", + "tooltip": "", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "AISCOT", + "payload": "dronecot", "payloadType": "str", - "topic": "", + "topic": "restart", "topicType": "str", - "x": 260, - "y": 500, + "x": 610, + "y": 1400, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, { - "id": "ed1ad16c952783ba", + "id": "aec366735b90c72c", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 9, - "width": 4, + "name": "Disable dronecot", + "group": "f9087e66bb4cd9b2", + "order": 44, + "width": 2, "height": 1, "passthru": false, - "label": "Disable DoneCOT", + "label": "Disable", "tooltip": "", - "color": "", - "bgcolor": "red", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "DoneCOT", + "payload": "dronecot", "payloadType": "str", - "topic": "", + "topic": "disable", "topicType": "str", - "x": 250, - "y": 580, + "x": 610, + "y": 1480, "wires": [ [ - "08bbb4b6c1e5af69" + "ec8563d3c093ce78" ] ] }, { - "id": "03c993d6b3402462", + "id": "a8563af155324cda", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 5, + "name": "Enable dronecot", + "group": "f9087e66bb4cd9b2", + "order": 46, "width": 4, "height": 1, "passthru": false, - "label": "Enable AISCOT", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "AISCOT", + "payload": "dronecot", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 280, - "y": 880, + "x": 610, + "y": 1440, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, { - "id": "aa92ea6209a2b9e0", + "id": "179f0beec75125b2", "type": "ui_button", "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", + "name": "WiFi Enable", + "group": "f9087e66bb4cd9b2", "order": 8, "width": 4, "height": 1, "passthru": false, - "label": "Enable DroneCOT", + "label": "Enable", "tooltip": "", - "color": "", - "bgcolor": "green", + "color": "black", + "bgcolor": "white", "className": "", "icon": "", - "payload": "DroneCOT", + "payload": "comitup", "payloadType": "str", - "topic": "", + "topic": "enable", "topicType": "str", - "x": 270, - "y": 960, + "x": 590, + "y": 1540, "wires": [ [ - "a903f3dcc9380af0" + "ec8563d3c093ce78" ] ] }, @@ -1720,12 +2005,13 @@ "id": "095368571cbf1fcf", "type": "ui_chart", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "name": "Current Aircraft", "group": "fa4e075e1fa30638", - "order": 10, - "width": 0, - "height": 0, - "label": "Current ADS-B Tracks", + "order": 14, + "width": 10, + "height": 5, + "label": "Current ADS-B Aircraft", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", @@ -1754,7 +2040,7 @@ "outputs": 1, "useDifferentColor": false, "className": "", - "x": 520, + "x": 460, "y": 100, "wires": [ [] @@ -1764,15 +2050,17 @@ "id": "c82e38d047199cb5", "type": "function", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "name": "Current Aircraft Count", - "func": "let pl = msg.payload;\n\nlet payloads = [\n { \"payload\": msg.payload.aircraft.length },\n { \"payload\": msg.payload.messages }\n]\n\nreturn payloads;", - "outputs": 2, + "func": "let pl = msg.payload;\n\nlet payloads = [\n { payload: pl.aircraft.length },\n { payload: pl.messages },\n { payload: pl.now }\n]\n\nreturn payloads;", + "outputs": 3, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 300, - "y": 100, + "x": 240, + "y": 120, "wires": [ [ "095368571cbf1fcf", @@ -1780,6 +2068,9 @@ ], [ "16d10d070ec070d9" + ], + [ + "8db81499fdb5170a" ] ] }, @@ -1787,9 +2078,10 @@ "id": "16d10d070ec070d9", "type": "ui_text", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "group": "fa4e075e1fa30638", - "order": 3, - "width": "10", + "order": 12, + "width": 5, "height": 1, "name": "", "label": "Total ADS-B Messages", @@ -1800,7 +2092,7 @@ "font": "", "fontSize": 16, "color": "#000000", - "x": 550, + "x": 490, "y": 140, "wires": [] }, @@ -1824,8 +2116,8 @@ "#e6e600", "#ca3838" ], - "x": 710, - "y": 600, + "x": 695.5, + "y": 851.75, "wires": [] }, { @@ -1838,8 +2130,8 @@ "useSpawn": "", "timer": "", "name": "RPi Temp.", - "x": 330, - "y": 620, + "x": 315.5, + "y": 871.75, "wires": [ [ "fa5b499.e176cb8" @@ -1871,8 +2163,8 @@ "topic": "", "payload": "", "payloadType": "date", - "x": 124.5, - "y": 648.25, + "x": 110, + "y": 900, "wires": [ [ "fba68adf.14e13", @@ -1889,8 +2181,8 @@ "func": "str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;", "outputs": 1, "noerr": 0, - "x": 500, - "y": 600, + "x": 485.5, + "y": 851.75, "wires": [ [ "2653a0b0.26d638", @@ -1936,8 +2228,8 @@ "outputs": 1, "useDifferentColor": false, "className": "", - "x": 710, - "y": 640, + "x": 695.5, + "y": 891.75, "wires": [ [] ] @@ -1953,8 +2245,8 @@ "timer": "", "winHide": false, "name": "CPU Load", - "x": 330, - "y": 680, + "x": 315.5, + "y": 931.75, "wires": [ [ "a5da1eb0f58fe89a" @@ -1974,8 +2266,8 @@ "timer": "", "winHide": false, "name": "Free Memory", - "x": 330, - "y": 740, + "x": 315.5, + "y": 991.75, "wires": [ [ "77573ff2f632057f" @@ -2004,8 +2296,8 @@ "#e6e600", "#ca3838" ], - "x": 680, - "y": 680, + "x": 665.5, + "y": 931.75, "wires": [] }, { @@ -2032,8 +2324,8 @@ "seg2": "", "diff": false, "className": "", - "x": 640, - "y": 740, + "x": 625.5, + "y": 991.75, "wires": [] }, { @@ -2046,8 +2338,8 @@ "useSpawn": "", "timer": "", "name": "Disk Usage", - "x": 330, - "y": 880, + "x": 315.5, + "y": 1131.75, "wires": [ [ "d70b7556.a0a9e" @@ -2076,8 +2368,8 @@ "#e6e600", "#ca3838" ], - "x": 650, - "y": 880, + "x": 635.5, + "y": 1131.75, "wires": [] }, { @@ -2088,8 +2380,8 @@ "func": "var re = /([0-9]{2})%/\nvar idx = msg.payload.search(re);\nvar str = msg.payload;\nif (idx >=0) {\n str = msg.payload.substring(idx, idx + 2);\n}\nmsg.payload = str;\nreturn msg;", "outputs": 1, "noerr": 0, - "x": 510, - "y": 880, + "x": 495.5, + "y": 1131.75, "wires": [ [ "7ca6ecb.7512014" @@ -2107,8 +2399,8 @@ "topic": "", "payload": "", "payloadType": "date", - "x": 130, - "y": 880, + "x": 115.5, + "y": 1131.75, "wires": [ [ "270f61f0.9af05e" @@ -2126,8 +2418,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 500, - "y": 740, + "x": 485.5, + "y": 991.75, "wires": [ [ "9b301b09.8c0468" @@ -2145,8 +2437,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 520, - "y": 680, + "x": 505.5, + "y": 931.75, "wires": [ [ "b9372186.ed1a5" @@ -2157,12 +2449,13 @@ "id": "20787a00729ffe5f", "type": "link in", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "name": "Dashboard In", "links": [ "64fa2c00f63bdd53" ], - "x": 155, - "y": 100, + "x": 105, + "y": 120, "wires": [ [ "c82e38d047199cb5" @@ -2173,19 +2466,21 @@ "id": "c1b4f4996f5aa122", "type": "comment", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "name": "ADS-B Dashboard", "info": "", - "x": 110, - "y": 40, + "x": 150, + "y": 60, "wires": [] }, { "id": "7750039932acdcc7", "type": "ui_text", "z": "94cf869050128770", + "g": "45da34b7e4bdb957", "group": "fa4e075e1fa30638", - "order": 2, - "width": 4, + "order": 11, + "width": 5, "height": 1, "name": "Current Tracks", "label": "Current Tracks", @@ -2196,7 +2491,7 @@ "font": "", "fontSize": 16, "color": "#000000", - "x": 520, + "x": 460, "y": 60, "wires": [] }, @@ -2209,10 +2504,10 @@ "repeat": "300", "crontab": "", "once": true, - "onceDelay": "", + "onceDelay": "30", "topic": "", "x": 110, - "y": 500, + "y": 1380, "wires": [ [ "a8c763426a388421" @@ -2227,26 +2522,31 @@ "addpay": false, "append": "", "useSpawn": "", - "timer": "", + "timer": "5", "winHide": false, "name": "gpsctl", "x": 290, - "y": 500, + "y": 1380, "wires": [ [ - "6ffc305ab7e20ec7" + "6ffc305ab7e20ec7", + "5fad15ef4b61bca7" ], - [], - [] + [ + "5fad15ef4b61bca7" + ], + [ + "5fad15ef4b61bca7" + ] ] }, { "id": "6ffc305ab7e20ec7", "type": "ui_text", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", - "order": 12, - "width": "10", + "group": "fa4e075e1fa30638", + "order": 8, + "width": 10, "height": 1, "name": "GPSCTL", "label": "GPS Device:", @@ -2258,25 +2558,26 @@ "fontSize": 16, "color": "#000000", "x": 460, - "y": 480, + "y": 1360, "wires": [] }, { "id": "73eb77cde2c7a709", "type": "exec", "z": "94cf869050128770", - "command": "gpspipe --json -n 5|grep TPV|tail -1", + "g": "fb90e60944764ed9", + "command": "gpspipe --json -n 5", "addpay": false, "append": "", "useSpawn": "", - "timer": "", + "timer": "30", "winHide": false, "name": "gpspipe", - "x": 300, - "y": 420, + "x": 160, + "y": 480, "wires": [ [ - "de2c209dbe934060" + "7c69f96954e99a9b" ], [], [] @@ -2286,6 +2587,7 @@ "id": "69bd079907c39f3c", "type": "inject", "z": "94cf869050128770", + "g": "fb90e60944764ed9", "name": "", "props": [], "repeat": "30", @@ -2293,7 +2595,7 @@ "once": true, "onceDelay": "", "topic": "", - "x": 110, + "x": 130, "y": 420, "wires": [ [ @@ -2305,15 +2607,16 @@ "id": "de2c209dbe934060", "type": "json", "z": "94cf869050128770", + "g": "fb90e60944764ed9", "name": "", "property": "payload", "action": "", "pretty": false, - "x": 430, - "y": 400, + "x": 310, + "y": 500, "wires": [ [ - "1190f05a50aad89c" + "f20627a1cbc79171" ] ] }, @@ -2321,6 +2624,7 @@ "id": "1190f05a50aad89c", "type": "function", "z": "94cf869050128770", + "g": "fb90e60944764ed9", "name": "GPS Mode Lookup", "func": "// https://gpsd.gitlab.io/gpsd/gpsd_json.html\n\nconst pl = msg.payload;\n\nmsg.payload = \"Invalid Mode\";\n\nswitch (parseInt(pl.mode)) { \n case 0:\n msg.payload = \"UNKNOWN\";\n break;\n case 1:\n msg.payload = \"NO FIX\";\n break;\n case 2:\n msg.payload = \"2D\";\n break;\n case 3:\n msg.payload = \"3D\";\n break;\n default:\n msg.payload = \"Invalid Mode\";\n break;\n}\n\nreturn msg;", "outputs": 1, @@ -2328,8 +2632,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 610, - "y": 400, + "x": 510, + "y": 500, "wires": [ [ "43958e20b7e848a3" @@ -2340,20 +2644,23 @@ "id": "24d11b12327e6147", "type": "exec", "z": "94cf869050128770", - "command": "rtl_test 2>&1|grep -A2 Found|tail -n 2", + "g": "75d810e2c34e3c4f", + "command": "rtl_test", "addpay": false, "append": "", "useSpawn": "", "timer": "5", "winHide": false, "name": "rtl_test", - "x": 290, - "y": 320, + "x": 250, + "y": 300, "wires": [ [ "c694287e0ecfdb11" ], - [], + [ + "c694287e0ecfdb11" + ], [] ] }, @@ -2361,7 +2668,8 @@ "id": "b36b3af7a720fa09", "type": "inject", "z": "94cf869050128770", - "name": "", + "g": "75d810e2c34e3c4f", + "name": "30s", "props": [], "repeat": "30", "crontab": "", @@ -2369,7 +2677,7 @@ "onceDelay": "", "topic": "", "x": 130, - "y": 320, + "y": 300, "wires": [ [ "24d11b12327e6147" @@ -2380,14 +2688,16 @@ "id": "c694287e0ecfdb11", "type": "function", "z": "94cf869050128770", + "g": "75d810e2c34e3c4f", "name": "SDR List", - "func": "const pl = msg.payload;\n\nconst sdrs = pl.split(\"\\n\").filter(n => n)\n\nmsg.payload = sdrs;\n\nreturn msg;", + "func": "// 2>&1|grep -A2 Found|tail -n 2\n\n/*\n * This function takes in an input string and a search term. \n * \n * It then splits the input string into an array of lines, \n * finds the index of the line that contains the search term, \n * and returns the next two lines after the matched line, \n * separated by newlines. \n * \n * If the search term is not found or if there are not enough \n * lines after the match, it returns null.\n*/\nfunction grepA2(inputString, searchTerm) {\n // Split the input string by newlines\n const lines = inputString.split('\\n');\n // Find the index of the matched line\n const index = lines.findIndex(line => line.includes(searchTerm));\n\n if (index !== -1 && index < lines.length - 2) {\n // Return the next two lines after the matched line\n return lines.slice(index + 1, index + 3).join('\\n');\n } else {\n // Return null if the searchTerm is not found or if there are not enough lines after the match\n return null;\n }\n}\n\nlet pl = grepA2(msg.payload, \"Found\");\n\nif (typeof pl !== undefined && pl !== null) {\n msg.payload = pl.split(\"\\n\");\n return msg;\n}\n", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 420, + "x": 400, "y": 300, "wires": [ [ @@ -2400,9 +2710,10 @@ "id": "ab8919275dc5a1bb", "type": "ui_text", "z": "94cf869050128770", + "g": "75d810e2c34e3c4f", "group": "fa4e075e1fa30638", - "order": 4, - "width": "10", + "order": 6, + "width": 10, "height": 1, "name": "SDR 1", "label": "SDR 1:", @@ -2410,10 +2721,10 @@ "layout": "row-left", "className": "", "style": false, - "font": "", + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", - "x": 610, + "x": 550, "y": 280, "wires": [] }, @@ -2421,9 +2732,10 @@ "id": "65b80260e6a12016", "type": "ui_text", "z": "94cf869050128770", + "g": "75d810e2c34e3c4f", "group": "fa4e075e1fa30638", - "order": 5, - "width": "10", + "order": 7, + "width": 10, "height": 1, "name": "SDR 2", "label": "SDR 2:", @@ -2434,7 +2746,7 @@ "font": "", "fontSize": 16, "color": "#000000", - "x": 610, + "x": 550, "y": 320, "wires": [] }, @@ -2564,9 +2876,10 @@ "id": "43958e20b7e848a3", "type": "ui_text", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", - "order": 13, - "width": "10", + "g": "fb90e60944764ed9", + "group": "fa4e075e1fa30638", + "order": 9, + "width": 10, "height": 1, "name": "GPS Fix?", "label": "GPS Mode/Fix:", @@ -2577,14 +2890,15 @@ "font": "", "fontSize": 16, "color": "#000000", - "x": 780, - "y": 400, + "x": 640, + "y": 460, "wires": [] }, { "id": "67c1aa629a2e95af", "type": "exec", "z": "94cf869050128770", + "g": "a1d4fe25968a5368", "command": "/usr/local/sbin/get_throttled.sh", "addpay": false, "append": "", @@ -2592,8 +2906,8 @@ "timer": "", "winHide": false, "name": "", - "x": 350, - "y": 1420, + "x": 790, + "y": 620, "wires": [ [ "4f64ec7db13ee424" @@ -2606,19 +2920,20 @@ "id": "4f64ec7db13ee424", "type": "ui_template", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", + "g": "a1d4fe25968a5368", + "group": "fa4e075e1fa30638", "name": "Throttle Status", - "order": 5, - "width": "10", - "height": "4", + "order": 10, + "width": 10, + "height": 3, "format": "Throttle Status\n
\n", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", - "x": 580, - "y": 1400, + "x": 1020, + "y": 600, "wires": [ [] ] @@ -2627,6 +2942,7 @@ "id": "4338acd2934924cc", "type": "inject", "z": "94cf869050128770", + "g": "a1d4fe25968a5368", "name": "", "props": [], "repeat": "300", @@ -2634,8 +2950,8 @@ "once": true, "onceDelay": "", "topic": "", - "x": 130, - "y": 1420, + "x": 590, + "y": 620, "wires": [ [ "67c1aa629a2e95af" @@ -2646,15 +2962,16 @@ "id": "16419a36256c9583", "type": "inject", "z": "94cf869050128770", - "name": "", + "g": "e3b3a9c137f6b1a8", + "name": "1m", "props": [], "repeat": "60", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", - "x": 150, - "y": 1080, + "x": 130, + "y": 620, "wires": [ [ "b1d1259dd556c68a" @@ -2665,6 +2982,7 @@ "id": "b1d1259dd556c68a", "type": "exec", "z": "94cf869050128770", + "g": "e3b3a9c137f6b1a8", "command": "uptime", "addpay": false, "append": "", @@ -2672,8 +2990,8 @@ "timer": "", "winHide": false, "name": "", - "x": 270, - "y": 1080, + "x": 250, + "y": 620, "wires": [ [ "267687b40c52261e" @@ -2686,9 +3004,10 @@ "id": "267687b40c52261e", "type": "ui_text", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", - "order": 4, - "width": "10", + "g": "e3b3a9c137f6b1a8", + "group": "fa4e075e1fa30638", + "order": 5, + "width": 10, "height": 1, "name": "", "label": "Uptime: ", @@ -2699,8 +3018,8 @@ "font": "", "fontSize": 16, "color": "#000000", - "x": 420, - "y": 1080, + "x": 400, + "y": 620, "wires": [] }, { @@ -2712,7 +3031,7 @@ "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "[\n \"ADSBCOT\",\n \"dump1090-fa\",\n \"dump978-fa\",\n \"comitup\",\n \"LINCOT\",\n \"nodered\",\n \"gpsd\",\n \"readsb\",\n \"AISCOT\",\n \"DroneCOT\"\n]", + "template": "[\n \"adsbcot\",\n \"dump1090-fa\",\n \"dump978-fa\",\n \"comitup\",\n \"lincot\",\n \"nodered\",\n \"gpsd\",\n \"readsb\",\n \"aiscot\",\n \"dronecot\",\n \"skyaware\",\n \"tar1090\"\n]", "output": "str", "x": 240, "y": 1960, @@ -2726,15 +3045,15 @@ "id": "285ece519bd3976f", "type": "inject", "z": "94cf869050128770", - "name": "", + "name": "30s", "props": [], - "repeat": "60", + "repeat": "30", "crontab": "", "once": true, "onceDelay": "", "topic": "", "x": 90, - "y": 1960, + "y": 2000, "wires": [ [ "4dfeafb5656bdb04" @@ -2752,7 +3071,7 @@ "arraySpltType": "len", "stream": false, "addname": "", - "x": 490, + "x": 410, "y": 1960, "wires": [ [ @@ -2768,8 +3087,8 @@ "property": "payload", "action": "", "pretty": false, - "x": 370, - "y": 1960, + "x": 250, + "y": 2000, "wires": [ [ "e93dc524c636e92d" @@ -2795,8 +3114,8 @@ "from": "", "to": "", "reg": false, - "x": 630, - "y": 1960, + "x": 430, + "y": 2000, "wires": [ [ "668b9fe6695a20aa" @@ -2852,19 +3171,19 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 6, - "width": 0, - "height": 0, - "name": "", - "label": "WiFi (comitup): ", + "order": 5, + "width": 10, + "height": 1, + "name": "WiFi Status", + "label": " WiFi", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", - "x": 1040, + "x": 1030, "y": 2320, "wires": [] }, @@ -2903,7 +3222,7 @@ }, { "t": "eq", - "v": "ADSBCOT", + "v": "adsbcot", "vt": "str" }, { @@ -2923,7 +3242,7 @@ }, { "t": "eq", - "v": "LINCOT", + "v": "lincot", "vt": "str" }, { @@ -2938,12 +3257,12 @@ }, { "t": "eq", - "v": "AISCOT", + "v": "aiscot", "vt": "str" }, { "t": "eq", - "v": "DroneCOT", + "v": "dronecot", "vt": "str" } ], @@ -3000,7 +3319,7 @@ }, { "t": "eq", - "v": "ADSBCOT", + "v": "adsbcot", "vt": "str" }, { @@ -3020,7 +3339,7 @@ }, { "t": "eq", - "v": "LINCOT", + "v": "lincot", "vt": "str" }, { @@ -3035,18 +3354,23 @@ }, { "t": "eq", - "v": "AISCOT", + "v": "aiscot", + "vt": "str" + }, + { + "t": "eq", + "v": "dronecot", "vt": "str" }, { "t": "eq", - "v": "DroneCOT", + "v": "skyaware", "vt": "str" } ], "checkall": "true", "repair": false, - "outputs": 10, + "outputs": 11, "x": 810, "y": 2440, "wires": [ @@ -3079,7 +3403,8 @@ ], [ "777555c9c8d0b55f" - ] + ], + [] ] }, { @@ -3087,7 +3412,7 @@ "type": "ui_template", "z": "94cf869050128770", "group": "985cb816630d7e12", - "name": "ADSBCOT Status", + "name": "adsbcot Status", "order": 5, "width": 20, "height": 5, @@ -3107,20 +3432,20 @@ "id": "385cbd3192ee530c", "type": "ui_text", "z": "94cf869050128770", - "group": "fa4e075e1fa30638", - "order": 6, - "width": 0, - "height": 0, - "name": "", - "label": "ADS-B to CoT (ADSBCOT): ", + "group": "f9087e66bb4cd9b2", + "order": 9, + "width": 10, + "height": 1, + "name": "Aircraft to TAK Gateway (adsbcot)", + "label": "Aircraft to TAK Gateway", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", - "x": 1080, + "x": 1110, "y": 2360, "wires": [] }, @@ -3128,20 +3453,20 @@ "id": "5775a3037267290d", "type": "ui_text", "z": "94cf869050128770", - "group": "fa4e075e1fa30638", - "order": 8, - "width": 0, - "height": 0, - "name": "", - "label": "F/A ADS-B Decoder (dump1090-fa): ", + "group": "f9087e66bb4cd9b2", + "order": 19, + "width": 8, + "height": 1, + "name": "F/A ADS-B Decoder (dump1090-fa)", + "label": "dump1090-fa (flightaware)", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", - "x": 1110, + "x": 1100, "y": 2400, "wires": [] }, @@ -3149,17 +3474,17 @@ "id": "1350c123dc081083", "type": "ui_text", "z": "94cf869050128770", - "group": "fa4e075e1fa30638", - "order": 9, + "group": "f9087e66bb4cd9b2", + "order": 35, "width": 0, "height": 0, - "name": "", - "label": "F/A UAT Decoder (dump978-fa): ", + "name": "F/A UAT Decoder (dump978-fa)", + "label": "Flightaware UAT Decoder", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1090, @@ -3171,16 +3496,16 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 7, + "order": 23, "width": 0, "height": 0, - "name": "", - "label": "Dashboard (Node-RED): ", + "name": "Dashboard (Node-RED)", + "label": "Dashboards (Node-RED)", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1070, @@ -3255,7 +3580,7 @@ "type": "ui_template", "z": "94cf869050128770", "group": "985cb816630d7e12", - "name": "LINCOT Status", + "name": "lincot Status", "order": 9, "width": 20, "height": 5, @@ -3276,19 +3601,19 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 8, + "order": 27, "width": 0, "height": 0, - "name": "", - "label": "Sensor Pos. to CoT (LINCOT): ", + "name": "Device TAK Beacon", + "label": "Device TAK Beacon", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", - "x": 1090, + "x": 1050, "y": 2520, "wires": [] }, @@ -3318,16 +3643,16 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 11, + "order": 31, "width": 0, "height": 0, - "name": "", - "label": "GPSd: ", + "name": "GPS", + "label": "GPS", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1010, @@ -3342,8 +3667,8 @@ "links": [ "05b15b7858e7cbca" ], - "x": 95, - "y": 1900, + "x": 125, + "y": 1960, "wires": [ [ "4dfeafb5656bdb04" @@ -3452,11 +3777,11 @@ "id": "08b0c289b467c651", "type": "ui_template", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", + "group": "fa4e075e1fa30638", "name": "IP Interfaces", - "order": 2, + "order": 4, "width": 5, - "height": 3, + "height": 2, "format": "IP Interfaces\n
\n", "storeOutMessages": true, "fwdInMessages": true, @@ -3473,6 +3798,7 @@ "id": "9f8119755cf73778", "type": "qrcode-generator", "z": "94cf869050128770", + "g": "d34772b1b10233f2", "name": "", "qrtype": "wifi2qr", "text2qrText": "", @@ -3490,8 +3816,8 @@ "colorlight": "#ffffff", "colordark": "#000000", "printstatus": true, - "x": 510, - "y": 2800, + "x": 1070, + "y": 480, "wires": [ [ "cbbe264f84b53680" @@ -3502,12 +3828,13 @@ "id": "a1642742e713d559", "type": "link in", "z": "94cf869050128770", + "g": "d34772b1b10233f2", "name": "QR Code In", "links": [ "b104d679e8967f58" ], - "x": 225, - "y": 2800, + "x": 785, + "y": 480, "wires": [ [ "8a9319936729c649" @@ -3518,6 +3845,7 @@ "id": "8a9319936729c649", "type": "function", "z": "94cf869050128770", + "g": "d34772b1b10233f2", "name": "Set URL", "func": "const pl = msg.payload\nlet nodeId = pl.match(/NODE_ID=(?[^\\n\\r]+)/).groups.nodeId\nlet ssid = `AryaOS-${nodeId.substr(-4, 4)}`\n\nlet wifiUrl = `WIFI:S:${ssid};T:;P:;H:false;`\nmsg.qrcodeinput = wifiUrl\nmsg.ssid = ssid\nreturn msg;\n", "outputs": 1, @@ -3526,8 +3854,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 340, - "y": 2800, + "x": 900, + "y": 480, "wires": [ [ "9f8119755cf73778" @@ -3538,9 +3866,10 @@ "id": "cbbe264f84b53680", "type": "ui_template", "z": "94cf869050128770", - "group": "f9087e66bb4cd9b2", + "g": "d34772b1b10233f2", + "group": "fa4e075e1fa30638", "name": "QR Code", - "order": 3, + "order": 2, "width": 5, "height": 4, "format": "
Join AryaOS Wifi: \n
{{msg.ssid}}
", @@ -3549,8 +3878,8 @@ "resendOnRefresh": true, "templateScope": "local", "className": "", - "x": 680, - "y": 2800, + "x": 1240, + "y": 480, "wires": [ [] ] @@ -3580,17 +3909,17 @@ "id": "8130292204e4ea17", "type": "ui_text", "z": "94cf869050128770", - "group": "fa4e075e1fa30638", - "order": 7, - "width": 0, - "height": 0, - "name": "", - "label": "ADSB/X ADS-B Decoder (readsb):", + "group": "f9087e66bb4cd9b2", + "order": 15, + "width": 8, + "height": 1, + "name": "ADSB/X ADS-B Decoder (readsb)", + "label": "readsb (adsbexchange)", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1100, @@ -3602,7 +3931,7 @@ "type": "ui_template", "z": "94cf869050128770", "group": "985cb816630d7e12", - "name": "AISCOT Status", + "name": "aiscot Status", "order": 9, "width": 20, "height": 5, @@ -3623,7 +3952,7 @@ "type": "ui_template", "z": "94cf869050128770", "group": "985cb816630d7e12", - "name": "DroneCOT Status", + "name": "dronecot Status", "order": 9, "width": 20, "height": 5, @@ -3644,16 +3973,16 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 9, + "order": 39, "width": 0, "height": 0, - "name": "", - "label": "AIS to CoT (AISCOT): ", + "name": "AIS to CoT (aiscot)", + "label": "AIS to CoT (aiscot)", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1060, @@ -3665,16 +3994,16 @@ "type": "ui_text", "z": "94cf869050128770", "group": "f9087e66bb4cd9b2", - "order": 10, + "order": 43, "width": 0, "height": 0, - "name": "", - "label": "Remote ID to CoT (DroneCOT): ", + "name": "Remote ID to CoT (dronecot)", + "label": "Remote ID to CoT (dronecot)", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 1090, @@ -3685,63 +4014,393 @@ "id": "808f9f656a06999e", "type": "inject", "z": "94cf869050128770", - "name": "", + "g": "3de15a4313928391", + "name": "30s", "props": [], - "repeat": "300", + "repeat": "30", "crontab": "", "once": true, "onceDelay": "", "topic": "", "x": 130, - "y": 2960, + "y": 740, + "wires": [ + [ + "b2825e8d13e21f82" + ] + ] + }, + { + "id": "b2825e8d13e21f82", + "type": "exec", + "z": "94cf869050128770", + "g": "3de15a4313928391", + "command": "docker ps", + "addpay": false, + "append": "", + "useSpawn": "", + "timer": "", + "winHide": false, + "name": "", + "x": 260, + "y": 740, + "wires": [ + [ + "d033dfa14fa3a005" + ], + [], + [] + ] + }, + { + "id": "d033dfa14fa3a005", + "type": "ui_template", + "z": "94cf869050128770", + "g": "3de15a4313928391", + "group": "985cb816630d7e12", + "name": "Docker PS", + "order": 1, + "width": 20, + "height": 4, + "format": "Docker PS\n\n
", + "storeOutMessages": true, + "fwdInMessages": true, + "resendOnRefresh": true, + "templateScope": "local", + "className": "", + "x": 410, + "y": 740, + "wires": [ + [] + ] + }, + { + "id": "ab90271f7830e67f", + "type": "ui_text", + "z": "94cf869050128770", + "group": "f9087e66bb4cd9b2", + "order": 13, + "width": 10, + "height": 1, + "name": "", + "label": "Aircraft Decoder", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", + "fontSize": 16, + "color": "#000000", + "x": 620, + "y": 2660, + "wires": [] + }, + { + "id": "5cfdb012b7c10a7c", + "type": "ui_text", + "z": "94cf869050128770", + "group": "f9087e66bb4cd9b2", + "order": 14, + "width": 2, + "height": 4, + "name": "", + "label": "Mutually Exclusive (Choose One)", + "format": "", + "layout": "row-spread", + "className": "", + "style": true, + "font": "Arial Narrow,Nimbus Sans L,sans-serif", + "fontSize": 16, + "color": "#000000", + "x": 680, + "y": 2700, + "wires": [] + }, + { + "id": "e0d87a55d461c609", + "type": "ui_text", + "z": "94cf869050128770", + "g": "45da34b7e4bdb957", + "group": "fa4e075e1fa30638", + "order": 13, + "width": 10, + "height": 1, + "name": "Last Update", + "label": "Last Update (secs.)", + "format": "{{msg.payload}}", + "layout": "row-left", + "className": "", + "style": false, + "font": "", + "fontSize": 16, + "color": "#000000", + "x": 590, + "y": 180, + "wires": [] + }, + { + "id": "8db81499fdb5170a", + "type": "function", + "z": "94cf869050128770", + "g": "45da34b7e4bdb957", + "name": "Get Delta", + "func": "let pl = msg.payload\nflow.set(\"lastUpdate\", pl)\n\n// let now = new Date(Date.now()).toISOString()\nlet now = Date.now()\nlet delta = now*1000 - (pl/1000)\n\nmsg.payload = parseInt(now/1000 - pl)\n\n\nreturn msg;\n\n", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 440, + "y": 180, + "wires": [ + [ + "e0d87a55d461c609" + ] + ] + }, + { + "id": "681d2876a7db4f51", + "type": "inject", + "z": "94cf869050128770", + "g": "45da34b7e4bdb957", + "name": "10s", + "props": [], + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "x": 130, + "y": 180, + "wires": [ + [ + "d85368cd75bb347e" + ] + ] + }, + { + "id": "d85368cd75bb347e", + "type": "change", + "z": "94cf869050128770", + "g": "45da34b7e4bdb957", + "name": "lastUpdate", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "lastUpdate", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 180, + "wires": [ + [ + "8db81499fdb5170a" + ] + ] + }, + { + "id": "5fad15ef4b61bca7", + "type": "debug", + "z": "94cf869050128770", + "name": "debug 30", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 460, + "y": 1400, + "wires": [] + }, + { + "id": "7c69f96954e99a9b", + "type": "split", + "z": "94cf869050128770", + "g": "fb90e60944764ed9", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "", + "x": 290, + "y": 460, + "wires": [ + [ + "de2c209dbe934060" + ] + ] + }, + { + "id": "f20627a1cbc79171", + "type": "switch", + "z": "94cf869050128770", + "g": "fb90e60944764ed9", + "name": "Class", + "property": "payload.class", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "TPV", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 450, + "y": 460, "wires": [ [ - "b2825e8d13e21f82" + "1190f05a50aad89c" ] ] }, { - "id": "b2825e8d13e21f82", + "id": "4a87ab6388bffac2", "type": "exec", "z": "94cf869050128770", - "command": "docker ps", + "g": "1d17f399c2310113", + "command": "hostnamectl --json=pretty status", "addpay": false, "append": "", "useSpawn": "", "timer": "", "winHide": false, "name": "", - "x": 300, - "y": 2960, + "x": 860, + "y": 740, "wires": [ [ - "d033dfa14fa3a005" + "5d6ab3c272199b94", + "6ee20da0ae45fefa" ], [], [] ] }, { - "id": "d033dfa14fa3a005", + "id": "1fca29d62080fdd9", + "type": "inject", + "z": "94cf869050128770", + "g": "1d17f399c2310113", + "name": "1m", + "props": [], + "repeat": "60", + "crontab": "", + "once": true, + "onceDelay": "0.5", + "topic": "", + "x": 650, + "y": 740, + "wires": [ + [ + "4a87ab6388bffac2" + ] + ] + }, + { + "id": "5d6ab3c272199b94", "type": "ui_template", "z": "94cf869050128770", + "g": "1d17f399c2310113", "group": "985cb816630d7e12", - "name": "Docker PS", - "order": 1, - "width": 20, - "height": 4, - "format": "Docker PS\n\n
", + "name": "Hostnamectl", + "order": 14, + "width": "10", + "height": "10", + "format": "Hostnamectl\n
\n
\n
\n
", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", - "x": 490, - "y": 2940, + "x": 1090, + "y": 760, "wires": [ [] ] }, + { + "id": "dc3fd8b497972cae", + "type": "ui_text", + "z": "94cf869050128770", + "g": "1d17f399c2310113", + "group": "fa4e075e1fa30638", + "order": 3, + "width": 5, + "height": 1, + "name": "Hostname", + "label": "Hostname:", + "format": "{{msg.payload}}", + "layout": "row-left", + "className": "", + "style": false, + "font": "", + "fontSize": 16, + "color": "#000000", + "x": 1370, + "y": 720, + "wires": [] + }, + { + "id": "2d5d9381afea8c59", + "type": "change", + "z": "94cf869050128770", + "g": "1d17f399c2310113", + "name": "Hostname", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.Hostname", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1210, + "y": 720, + "wires": [ + [ + "dc3fd8b497972cae" + ] + ] + }, + { + "id": "6ee20da0ae45fefa", + "type": "json", + "z": "94cf869050128770", + "g": "1d17f399c2310113", + "name": "", + "property": "payload", + "action": "", + "pretty": false, + "x": 1070, + "y": 720, + "wires": [ + [ + "2d5d9381afea8c59" + ] + ] + }, { "id": "605314ea7983779d", "type": "worldmap", @@ -3840,7 +4499,7 @@ "type": "ui_worldmap", "z": "9c4ba3cbc4bd87fa", "group": "fa4e075e1fa30638", - "order": 11, + "order": 15, "width": 0, "height": 0, "name": "", @@ -4021,12 +4680,13 @@ "id": "5f6eab2d3d6ad9be", "type": "json", "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", "name": "", "property": "payload", "action": "", "pretty": false, - "x": 450, - "y": 60, + "x": 570, + "y": 580, "wires": [ [ "64fa2c00f63bdd53" @@ -4037,6 +4697,7 @@ "id": "64fa2c00f63bdd53", "type": "link out", "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", "name": "aircraft Out", "mode": "link", "links": [ @@ -4044,22 +4705,23 @@ "2934adb02aeb8158", "24b067af1a8cbf7d" ], - "x": 545, - "y": 60, + "x": 675, + "y": 540, "wires": [] }, { "id": "b068a436f07cc0bd", "type": "watch", "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", "name": "", - "files": "/run/adsb/aircraft.json", + "files": "/run/adsb", "recursive": "", - "x": 140, - "y": 60, + "x": 120, + "y": 460, "wires": [ [ - "99dfc7e97f5f8d47" + "b3d1b7bf5a4edba2" ] ] }, @@ -4067,6 +4729,7 @@ "id": "99dfc7e97f5f8d47", "type": "file in", "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", "name": "", "filename": "payload", "filenameType": "msg", @@ -4075,8 +4738,8 @@ "sendError": false, "encoding": "none", "allProps": false, - "x": 320, - "y": 60, + "x": 540, + "y": 540, "wires": [ [ "5f6eab2d3d6ad9be" @@ -4088,7 +4751,7 @@ "type": "watch", "z": "76732e91104cd622", "name": "", - "files": "/boot/ADSBCOT-config.txt", + "files": "/etc/default/adsbcot", "recursive": "", "x": 150, "y": 160, @@ -4103,7 +4766,7 @@ "id": "99875f9d26d1f50e", "type": "link out", "z": "76732e91104cd622", - "name": "ADSBCOT-config.txt Out", + "name": "adsbcot-config.txt Out", "mode": "link", "links": [ "09f4ad56eb3fd133" @@ -4116,7 +4779,7 @@ "id": "5f868835544d4788", "type": "inject", "z": "76732e91104cd622", - "name": "/boot/ADSBCOT-config.txt", + "name": "/etc/default/adsbcot", "props": [ { "p": "payload" @@ -4127,7 +4790,7 @@ "once": true, "onceDelay": 0.1, "topic": "", - "payload": "/boot/ADSBCOT-config.txt", + "payload": "/etc/default/adsbcot", "payloadType": "str", "x": 150, "y": 120, @@ -4142,7 +4805,7 @@ "type": "watch", "z": "76732e91104cd622", "name": "", - "files": "/boot/AryaOS-config.txt", + "files": "/etc/default/aryaos", "recursive": "", "x": 140, "y": 260, @@ -4177,7 +4840,7 @@ "id": "b104d679e8967f58", "type": "link out", "z": "76732e91104cd622", - "name": "AryaOS-config.txt Out", + "name": "aryaos-config.txt Out", "mode": "link", "links": [ "a1642742e713d559", @@ -4202,7 +4865,7 @@ "once": true, "onceDelay": 0.1, "topic": "", - "payload": "/boot/AryaOS-config.txt", + "payload": "/etc/default/aryaos", "payloadType": "str", "x": 140, "y": 220, @@ -4216,6 +4879,7 @@ "id": "4aa3f8001760c96a", "type": "udp in", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "", "iface": "", "port": "6969", @@ -4223,8 +4887,8 @@ "multicast": "true", "group": "239.2.3.1", "datatype": "buffer", - "x": 130, - "y": 380, + "x": 170, + "y": 800, "wires": [ [ "089a5c1ffeafe91b" @@ -4235,6 +4899,7 @@ "id": "e0a7e9ef71a6f0e8", "type": "udp in", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "", "iface": "wlan0", "port": "6969", @@ -4242,8 +4907,8 @@ "multicast": "true", "group": "239.2.3.1", "datatype": "buffer", - "x": 130, - "y": 440, + "x": 170, + "y": 860, "wires": [ [ "089a5c1ffeafe91b" @@ -4254,6 +4919,7 @@ "id": "bd6f79df66f3f373", "type": "udp in", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "", "iface": "eth0", "port": "6969", @@ -4261,8 +4927,8 @@ "multicast": "true", "group": "239.2.3.1", "datatype": "buffer", - "x": 130, - "y": 500, + "x": 170, + "y": 920, "wires": [ [ "089a5c1ffeafe91b" @@ -4273,6 +4939,7 @@ "id": "089a5c1ffeafe91b", "type": "link out", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "Network TAK In", "mode": "link", "links": [ @@ -4280,8 +4947,8 @@ "3ffffc180cc204dd", "dc87e7e88303ec78" ], - "x": 325, - "y": 440, + "x": 365, + "y": 860, "wires": [] }, { @@ -4292,7 +4959,7 @@ "files": "tmpConf", "recursive": "", "x": 100, - "y": 620, + "y": 320, "wires": [ [ "18674460572a0475" @@ -4309,7 +4976,7 @@ "df765e01751751eb" ], "x": 515, - "y": 620, + "y": 320, "wires": [] }, { @@ -4325,7 +4992,7 @@ "encoding": "none", "allProps": false, "x": 420, - "y": 620, + "y": 320, "wires": [ [ "8ef58d62e7fd687c" @@ -4365,7 +5032,7 @@ "finalize": "", "libs": [], "x": 260, - "y": 620, + "y": 320, "wires": [ [ "1aa83bf16aa07349" @@ -4389,12 +5056,13 @@ "id": "58edafa9ab997436", "type": "link in", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "Out to Mesh SA", "links": [ "ddb201c5df845268" ], - "x": 75, - "y": 840, + "x": 225, + "y": 980, "wires": [ [ "a5dbb71f6d17579d" @@ -4405,6 +5073,7 @@ "id": "a5dbb71f6d17579d", "type": "udp out", "z": "76732e91104cd622", + "g": "265b840ea6186ecf", "name": "", "addr": "239.2.3.1", "iface": "", @@ -4413,10 +5082,132 @@ "outport": "", "base64": false, "multicast": "multi", - "x": 210, - "y": 840, + "x": 390, + "y": 980, "wires": [] }, + { + "id": "b3d1b7bf5a4edba2", + "type": "switch", + "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", + "name": "aircraft.json?", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "/run/adsb/aircraft.json", + "vt": "str" + }, + { + "t": "eq", + "v": "/run/dump1090/aircraft.json", + "vt": "str" + }, + { + "t": "eq", + "v": "/run/dump1090-fa/aircraft.json", + "vt": "str" + }, + { + "t": "eq", + "v": "/run/dump1090-mutability/aircraft.json", + "vt": "str" + }, + { + "t": "eq", + "v": "/run/readsb/aircraft.json", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 5, + "x": 370, + "y": 540, + "wires": [ + [ + "99dfc7e97f5f8d47" + ], + [ + "99dfc7e97f5f8d47" + ], + [ + "99dfc7e97f5f8d47" + ], + [ + "99dfc7e97f5f8d47" + ], + [ + "99dfc7e97f5f8d47" + ] + ] + }, + { + "id": "ce3be08760e15920", + "type": "watch", + "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", + "name": "", + "files": "/run/readsb", + "recursive": "", + "x": 130, + "y": 500, + "wires": [ + [ + "b3d1b7bf5a4edba2" + ] + ] + }, + { + "id": "65a40de620905bad", + "type": "watch", + "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", + "name": "", + "files": "/run/dump1090", + "recursive": "", + "x": 140, + "y": 540, + "wires": [ + [ + "b3d1b7bf5a4edba2" + ] + ] + }, + { + "id": "573961361f4ac80b", + "type": "watch", + "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", + "name": "", + "files": "/run/dump1090-fa", + "recursive": "", + "x": 150, + "y": 580, + "wires": [ + [ + "b3d1b7bf5a4edba2" + ] + ] + }, + { + "id": "61a91ec3d8b3f82b", + "type": "watch", + "z": "76732e91104cd622", + "g": "e165fa1b9bca5292", + "name": "", + "files": "/run/dump1090-mutability", + "recursive": "", + "x": 170, + "y": 620, + "wires": [ + [ + "b3d1b7bf5a4edba2" + ] + ] + }, { "id": "ede3aeb67d70b53d", "type": "ui_text_input", @@ -4745,12 +5536,12 @@ "id": "2f521601ceea7ce4", "type": "ui_text", "z": "4fa67ac9ec0c7369", - "group": "f9087e66bb4cd9b2", + "group": "fa4e075e1fa30638", "order": 1, - "width": 15, + "width": 5, "height": 1, "name": "", - "label": "NODE_ID", + "label": "Node ID: ", "format": "{{msg.payload}}", "layout": "row-left", "className": "", @@ -4939,7 +5730,7 @@ "z": "4fa67ac9ec0c7369", "g": "a247d145bc97ec4e", "name": "Use tmp file", - "func": "msg.tmpConfPath = msg.topic.replace(\"/boot/\", \"tmpConf/\")\n\nreturn msg;", + "func": "msg.tmpConfPath = msg.topic.replace(\"/etc/\", \"tmpConf/\")\n\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, @@ -4959,7 +5750,7 @@ "type": "link in", "z": "4fa67ac9ec0c7369", "g": "c5409a5d2b5e28d5", - "name": "ADSBCOT-config.txt In", + "name": "adsbcot-config.txt In", "links": [ "8ef58d62e7fd687c" ], @@ -4978,7 +5769,7 @@ "z": "4fa67ac9ec0c7369", "g": "c5409a5d2b5e28d5", "name": "Set Cmd", - "func": "let realName = msg.filename.replace(\"tmpConf/\", \"/boot/\").replace(\"/home/node-red/\", \"\")\nmsg.payload = `sudo cp ${msg.filename} ${realName}`\n\nreturn msg;", + "func": "let realName = msg.filename.replace(\"tmpConf/\", \"/etc/\").replace(\"/home/node-red/\", \"\")\nmsg.payload = `sudo cp ${msg.filename} ${realName}`\n\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, @@ -5125,7 +5916,7 @@ "type": "function", "z": "4fa67ac9ec0c7369", "name": "Set Configs", - "func": "let configs = {\n \"/boot/ADSBCOT-config.txt\": {\n FEED_URL: \"file:///run/adsb/aircraft.json\", \n POLL_INTERVAL: null, \n ALT_UPPER: null, \n ALT_LOWER: null\n },\n \"/boot/AryaOS-config.txt\": {\n NODE_ID: null,\n COT_URL: \"udp+wo://239.2.3.1:6969\",\n PYTAK_MULTICAST_LOCAL_ADDR: \"0.0.0.0\",\n PYTAK_TLS_CLIENT_CERT: null,\n WIFI_AP_IP: \"10.41.0.1\",\n COT_ACCESS: \"UNCLASSIFIED\",\n STATIC_LAT: null,\n STATIC_LON: null,\n STATIC_ALT: null,\n TFR_STATE: \"CA\",\n PYTAK_TLS_CLIENT_KEY: null,\n PYTAK_TLS_DONT_VERIFY: null,\n PYTAK_TLS_DONT_CHECK_HOSTNAME: null,\n PYTAK_TLS_CLIENT_CAFILE: null,\n PYTAK_TLS_CLIENT_PASSWORD: null,\n\n },\n \"/boot/LINCOT-config.txt\": {\n GPS_INFO_CMD: null,\n CALLSIGN: null\n }\n}\n\nflow.set(\"configs\", configs)\n\nreturn msg;", + "func": "let configs = {\n \"/etc/default/adsbcot\": {\n FEED_URL: \"file:///run/adsb/aircraft.json\", \n POLL_INTERVAL: null, \n ALT_UPPER: null, \n ALT_LOWER: null\n },\n \"/etc/default/aryaos\": {\n NODE_ID: null,\n COT_URL: \"udp+wo://239.2.3.1:6969\",\n PYTAK_MULTICAST_LOCAL_ADDR: \"0.0.0.0\",\n PYTAK_TLS_CLIENT_CERT: null,\n WIFI_AP_IP: \"10.41.0.1\",\n COT_ACCESS: \"UNCLASSIFIED\",\n STATIC_LAT: null,\n STATIC_LON: null,\n STATIC_ALT: null,\n TFR_STATE: \"CA\",\n PYTAK_TLS_CLIENT_KEY: null,\n PYTAK_TLS_DONT_VERIFY: null,\n PYTAK_TLS_DONT_CHECK_HOSTNAME: null,\n PYTAK_TLS_CLIENT_CAFILE: null,\n PYTAK_TLS_CLIENT_PASSWORD: null,\n\n },\n \"/etc/default/lincot\": {\n GPS_INFO_CMD: null,\n CALLSIGN: null\n }\n}\n\nflow.set(\"configs\", configs)\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -5164,13 +5955,13 @@ "id": "9b8548552e7fbfa4", "type": "change", "z": "4fa67ac9ec0c7369", - "name": "/boot/ADSBCOT-config.txt", + "name": "/etc/default/adsbcot", "rules": [ { "t": "set", "p": "filename", "pt": "msg", - "to": "/boot/ADSBCOT-config.txt", + "to": "/etc/default/adsbcot", "tot": "str" } ], @@ -5191,13 +5982,13 @@ "id": "52d59a8a443b3363", "type": "change", "z": "4fa67ac9ec0c7369", - "name": "/boot/AryaOS-config.txt", + "name": "/etc/default/aryaos", "rules": [ { "t": "set", "p": "filename", "pt": "msg", - "to": "/boot/AryaOS-config.txt", + "to": "/etc/default/aryaos", "tot": "str" } ], @@ -5437,13 +6228,13 @@ "id": "68268787596399d6", "type": "change", "z": "4fa67ac9ec0c7369", - "name": "/boot/LINCOT-config.txt", + "name": "/etc/default/lincot", "rules": [ { "t": "set", "p": "filename", "pt": "msg", - "to": "/boot/LINCOT-config.txt", + "to": "/etc/default/lincot", "tot": "str" } ], @@ -6188,12 +6979,12 @@ "type": "ui_button", "z": "f83d0c6d58d0338c", "name": "Start Recorder", - "group": "c5f1b8aa.45bc08", - "order": 25, + "group": "f9087e66bb4cd9b2", + "order": 4, "width": 4, "height": 1, "passthru": true, - "label": "Start Recorder", + "label": "Start", "tooltip": "Starts aircraft data recorder.", "color": "white", "bgcolor": "green", @@ -6216,12 +7007,12 @@ "type": "ui_button", "z": "f83d0c6d58d0338c", "name": "Stop Recorder", - "group": "c5f1b8aa.45bc08", - "order": 27, + "group": "f9087e66bb4cd9b2", + "order": 2, "width": 4, "height": 1, "passthru": true, - "label": "Stop Recorder", + "label": "Stop", "tooltip": "Stops aircraft data recorder.", "color": "white", "bgcolor": "red", @@ -6546,17 +7337,17 @@ "id": "40e21166afb5b8b6", "type": "ui_text", "z": "f83d0c6d58d0338c", - "group": "fa4e075e1fa30638", + "group": "f9087e66bb4cd9b2", "order": 1, "width": 0, "height": 0, - "name": "", - "label": "Recorder: ", + "name": "Recorder Status", + "label": "Recorder", "format": "{{msg.payload}}", - "layout": "row-left", + "layout": "row-spread", "className": "", - "style": false, - "font": "", + "style": true, + "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": 16, "color": "#000000", "x": 660, @@ -6584,12 +7375,12 @@ "type": "ui_button", "z": "f83d0c6d58d0338c", "name": "Clear Recordings", - "group": "c5f1b8aa.45bc08", - "order": 26, - "width": 4, + "group": "f9087e66bb4cd9b2", + "order": 3, + "width": 2, "height": 1, "passthru": true, - "label": "Clear Recordings", + "label": "Clear", "tooltip": "Deletes recorded aircraft data.", "color": "white", "bgcolor": "orange", diff --git a/stage5-common/00-install/files/node-red.sudoers b/shared_files/node-red/node-red.sudoers similarity index 65% rename from stage5-common/00-install/files/node-red.sudoers rename to shared_files/node-red/node-red.sudoers index 8d48669..bd017a5 100644 --- a/stage5-common/00-install/files/node-red.sudoers +++ b/shared_files/node-red/node-red.sudoers @@ -13,24 +13,23 @@ # limitations under the License. # +node-red ALL=(root) NOPASSWD: /bin/bash /tmp/update-nodejs-and-nodered --confirm-install --nodered-user=node-red --confirm-root --skip-pi --no-init + node-red ALL=(root) NOPASSWD: /sbin/reboot +node-red ALL=(root) NOPASSWD: /usr/bin/apt update -qq +node-red ALL=(root) NOPASSWD: /usr/bin/apt update node-red ALL=(root) NOPASSWD: /sbin/shutdown +node-red ALL=(root) NOPASSWD: /bin/systemctl status -node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/AryaOS-config.txt /boot/AryaOS-config.txt -node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/ADSBCOT-config.txt /boot/ADSBCOT-config.txt -node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/LINCOT-config.txt /boot/LINCOT-config.txt -node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/AISCOT-config.txt /boot/AISCOT-config.txt -node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/DroneCOT-config.txt /boot/DroneCOT-config.txt +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/adsbcot /etc/default/adsbcot +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/aiscot /etc/default/aiscot +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/lincot /etc/default/lincot +node-red ALL=(root) NOPASSWD: /usr/bin/cp /home/node-red/tmpConf/dronecot /etc/default/dronecot node-red ALL=(root) NOPASSWD: /usr/local/sbin/wifi-nuke.py node-red ALL=(root) NOPASSWD: /usr/bin/nmcli device disconnect wlan0 -node-red ALL=(root) NOPASSWD: /bin/systemctl disable readsb -node-red ALL=(root) NOPASSWD: /bin/systemctl enable readsb -node-red ALL=(root) NOPASSWD: /bin/systemctl start readsb -node-red ALL=(root) NOPASSWD: /bin/systemctl stop readsb -node-red ALL=(root) NOPASSWD: /bin/systemctl restart readsb - node-red ALL=(root) NOPASSWD: /usr/bin/dpkg -i /home/node-red/update.deb -# Content below this line is generated: +# FIXME: Repalce with services list +node-red ALL=(ALL) NOPASSWD:ALL diff --git a/shared_files/sea/AIS-catcher-main.zip b/shared_files/sea/AIS-catcher-main.zip new file mode 100644 index 0000000..23ffc08 Binary files /dev/null and b/shared_files/sea/AIS-catcher-main.zip differ diff --git a/shared_files/sea/ais-catcher.default.conf b/shared_files/sea/ais-catcher.default.conf new file mode 100644 index 0000000..1c2a88c --- /dev/null +++ b/shared_files/sea/ais-catcher.default.conf @@ -0,0 +1,21 @@ +# ais-catcher.default.conf + +# [-e baudrate port - open device at serial port with given baudrate] +SERIAL_BAUDRATE=38400 +SERIAL_PORT=/dev/ttyUSB1 + +# [-u xxx.xx.xx.xx yyy - UDP destination address and port (default: off)] +UDP_DEST_ADDR=127.0.0.1 +UDP_DEST_PORT=5050 + +# [-v [option: xx] - enable verbose mode, optional to provide update frequency of xx seconds (default: false)] +# VERBOSE=10 + +# [-N [optional: port][optional settings] - start http server at port, see README for details] +HTTP_PORT=8100 + +# TODO +# The user can make a page in markdown format. The content will be shown in the About tab of the web viewer: +# AIS-catcher -N 8100 ABOUT about.md +# HTTP_SETTINGS=ABOUT AryaOS.md + diff --git a/stage5-common/00-install/files/lincot.service b/shared_files/sea/ais-catcher.service similarity index 64% rename from stage5-common/00-install/files/lincot.service rename to shared_files/sea/ais-catcher.service index c36356b..ee1a424 100644 --- a/stage5-common/00-install/files/lincot.service +++ b/shared_files/sea/ais-catcher.service @@ -1,6 +1,4 @@ -# AryaOS LINCOT.service -# -# LINCOT service for systemd +# ais-catcher.service: ais-catcher service for systemd # # Copyright Sensors & Signals LLC https://www.snstac.com/ # @@ -16,20 +14,23 @@ # [Unit] -Description=LINCOT Linux GPSD to TAK Gateway -Documentation=https://github.com/SNSTAC/LINCOT +Description=ais-catcher Wants=network.target After=network.target [Service] -User=lincot +User=aiscatcher +ExecStart=/usr/local/bin/AIS-catcher -u ${UDP_DEST_ADDR} ${UDP_DEST_PORT} -e ${SERIAL_BAUDRATE} ${SERIAL_PORT} -N ${HTTP_PORT} +RuntimeDirectory=ais-catcher +SyslogIdentifier=ais-catcher +EnvironmentFile=/etc/default/ais-catcher Type=simple -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_LINCOT.sh -SyslogIdentifier=LINCOT -KillSignal=SIGINT Restart=always RestartSec=20 +StartLimitInterval=1 +StartLimitBurst=100 +RestartPreventExitStatus=64 +Nice=-1 [Install] WantedBy=default.target diff --git a/stage8-uas/00-install/files/docker-uas-broker/docker-compose.yml b/shared_files/uas/docker-uas-broker/docker-compose.yml similarity index 100% rename from stage8-uas/00-install/files/docker-uas-broker/docker-compose.yml rename to shared_files/uas/docker-uas-broker/docker-compose.yml diff --git a/stage8-uas/00-install/files/docker-uas-broker/mosquitto.conf b/shared_files/uas/docker-uas-broker/mosquitto.conf similarity index 100% rename from stage8-uas/00-install/files/docker-uas-broker/mosquitto.conf rename to shared_files/uas/docker-uas-broker/mosquitto.conf diff --git a/stage8-uas/00-install/files/docker-uas-sensor/config/dronescout.conf b/shared_files/uas/docker-uas-sensor/config/dronescout.conf similarity index 100% rename from stage8-uas/00-install/files/docker-uas-sensor/config/dronescout.conf rename to shared_files/uas/docker-uas-sensor/config/dronescout.conf diff --git a/stage8-uas/00-install/files/docker-uas-sensor/config/license b/shared_files/uas/docker-uas-sensor/config/license similarity index 100% rename from stage8-uas/00-install/files/docker-uas-sensor/config/license rename to shared_files/uas/docker-uas-sensor/config/license diff --git a/stage8-uas/00-install/files/docker-uas-sensor/config/serial-number b/shared_files/uas/docker-uas-sensor/config/serial-number similarity index 100% rename from stage8-uas/00-install/files/docker-uas-sensor/config/serial-number rename to shared_files/uas/docker-uas-sensor/config/serial-number diff --git a/stage8-uas/00-install/files/docker-uas-sensor/config/wlan_channels.conf b/shared_files/uas/docker-uas-sensor/config/wlan_channels.conf similarity index 100% rename from stage8-uas/00-install/files/docker-uas-sensor/config/wlan_channels.conf rename to shared_files/uas/docker-uas-sensor/config/wlan_channels.conf diff --git a/stage8-uas/00-install/files/docker-uas-sensor/docker-compose.yml b/shared_files/uas/docker-uas-sensor/docker-compose.yml similarity index 90% rename from stage8-uas/00-install/files/docker-uas-sensor/docker-compose.yml rename to shared_files/uas/docker-uas-sensor/docker-compose.yml index 4976cb6..38ac593 100644 --- a/stage8-uas/00-install/files/docker-uas-sensor/docker-compose.yml +++ b/shared_files/uas/docker-uas-sensor/docker-compose.yml @@ -2,7 +2,7 @@ version: '2' services: dronescout: - image: "docker.dronescout.co:5045/dronescout_arm64" #use dronescout_arm64 for ARM64 platforms + image: "docker.dronescout.co:5045/dronescout_amd64" #use dronescout_arm64 for ARM64 platforms volumes: - ./config:/config # folder with config files: dronescout.conf, wlan_channels.conf and license file - ./config/serial-number:/sys/firmware/devicetree/base/serial-number diff --git a/stage3-base/00-install/00-packages b/stage3-base/00-install/00-packages deleted file mode 100644 index a1ee80e..0000000 --- a/stage3-base/00-install/00-packages +++ /dev/null @@ -1,59 +0,0 @@ -gpsd -gpsd-clients - -python3-pip -python3-cryptography - -# libatlas-base-dev -# libzmq3-dev - -# libsoxr0 -# libsoxr-dev - -# libsamplerate0 -# libsamplerate0-dev - -rtl-sdr -librtlsdr-dev - -# libairspy0 -# libairspy-dev - -# libairspyhf1 -# libairspyhf-dev - -# hackrf -# hackrf-firmware -# libhackrf0 -# libhackrf-dev - -# bladerf -# libbladerf-dev -# python3-bladerf - -# libsoapysdr-dev -# libsoapysdr0.8 -# python3-soapysdr -# soapyremote-server -# soapysdr-module-all -# soapysdr-tools - -# gqrx-sdr -# cubicsdr - -# gnuradio-dev -# gr-osmosdr - -tcpdump -netcat-openbsd -nmap -socat -net-tools - -# Needy developer: -git -tmux -vim -curl -wget -build-essential diff --git a/stage3-base/00-install/00-run.sh b/stage3-base/00-install/00-run.sh deleted file mode 100755 index c6f9baa..0000000 --- a/stage3-base/00-install/00-run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -install -v -m 755 files/get_throttled.sh "${ROOTFS_DIR}/usr/local/sbin/" - -# Set UUID on first boot -install -v -m 755 files/set_UUID.sh "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 644 files/set_UUID.service "${ROOTFS_DIR}/etc/systemd/system/" - -# AryaOS Env configuration -install -v -m 644 "files/${AOS_FLAVOR:-AryaOS}-config.txt" "${ROOTFS_DIR}/boot/" -install -v -m 755 files/99-AryaOS-Dispatcher "${ROOTFS_DIR}/etc/NetworkManager/dispatcher.d/" -install -v -m 644 files/README-AryaOS.txt "${ROOTFS_DIR}/" - -# ZeroTier -install -v -m 755 files/install_ZT.sh "${ROOTFS_DIR}/usr/local/sbin/" diff --git a/stage3-base/00-install/01-run-chroot.sh b/stage3-base/00-install/01-run-chroot.sh deleted file mode 100755 index 885ff4a..0000000 --- a/stage3-base/00-install/01-run-chroot.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -systemctl enable set_UUID -systemctl set-default multi-user - -/usr/local/sbin/install_ZT.sh - -python3 -m pip install pytak --break-system-packages -python3 -m pip install takproto --break-system-packages -python3 -m pip install aprscot --break-system-packages - -echo "wireshark-common wireshark-common/install-setuid boolean true" | debconf-set-selections -echo "tshark-common tshark-common/install-setuid boolean true" | debconf-set-selections -DEBIAN_FRONTEND=noninteractive apt install tshark -y \ No newline at end of file diff --git a/stage3-base/00-install/files/README-AryaOS.txt b/stage3-base/00-install/files/README-AryaOS.txt deleted file mode 100644 index dea88f3..0000000 --- a/stage3-base/00-install/files/README-AryaOS.txt +++ /dev/null @@ -1,10 +0,0 @@ - -April 2, 2024 -------------- - -Thank you for purchasing or downloading AryaOS. Our hope is that this project serves -your mission needs. If you have any questions or need support at any time, you can -contact the developer of AryaOS at: gba@snstac.com or on Signal: +1-310-621-9598 - -Thank You, -Greg Albrecht diff --git a/stage3-base/prerun.sh b/stage3-base/prerun.sh deleted file mode 100755 index bb741e2..0000000 --- a/stage3-base/prerun.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e -# AryaOS prerun.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage3-wifi/00-install/00-packages b/stage3-wifi/00-install/00-packages deleted file mode 100644 index fa5325e..0000000 --- a/stage3-wifi/00-install/00-packages +++ /dev/null @@ -1,2 +0,0 @@ -iptables -comitup \ No newline at end of file diff --git a/stage3-wifi/00-install/00-run.sh b/stage3-wifi/00-install/00-run.sh deleted file mode 100755 index 71134f9..0000000 --- a/stage3-wifi/00-install/00-run.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# FIXME DEPRECATED: Replace old NetworkManager Python module. https://github.com/snstac/aryaos/issues/54 -install -v -m 644 files/NetworkManager.py "${ROOTFS_DIR}/usr/lib/python3/dist-packages/NetworkManager.py" diff --git a/stage3-wifi/00-install/02-run-chroot.sh b/stage3-wifi/00-install/02-run-chroot.sh deleted file mode 100755 index afc19fa..0000000 --- a/stage3-wifi/00-install/02-run-chroot.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -e -# AryaOS 02-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -systemctl enable NetworkManager diff --git a/stage3-wifi/00-install/03-run.sh b/stage3-wifi/00-install/03-run.sh deleted file mode 100755 index c9bda6f..0000000 --- a/stage3-wifi/00-install/03-run.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -e -# AryaOS 03-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# The main branch of comitup uses a different syntax. -# sed --follow-symlinks -i -E -e "s/SERVER_PORT = 80/SERVER_PORT = ${COMITUP_WEB_PORT}/" /usr/share/comitup/web/comitupweb.py -sed --follow-symlinks -i -E -e "s/port=80/port=9080/" "${ROOTFS_DIR}/usr/share/comitup/web/comitupweb.py" - -install -v -m 644 files/comitup.conf "${ROOTFS_DIR}/etc/" -install -v -m 755 files/run_comitup.sh "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 755 files/comitup-callback.sh "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 644 files/comitup.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 644 files/comitup.json "${ROOTFS_DIR}/var/lib/comitup/" \ No newline at end of file diff --git a/stage3-wifi/prerun.sh b/stage3-wifi/prerun.sh deleted file mode 100755 index bb741e2..0000000 --- a/stage3-wifi/prerun.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e -# AryaOS prerun.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage4-node-red/00-install/00-packages b/stage4-node-red/00-install/00-packages deleted file mode 100644 index 1c9522b..0000000 --- a/stage4-node-red/00-install/00-packages +++ /dev/null @@ -1,2 +0,0 @@ -npm -sudo \ No newline at end of file diff --git a/stage4-node-red/00-install/00-run.sh b/stage4-node-red/00-install/00-run.sh deleted file mode 100755 index 74a12ee..0000000 --- a/stage4-node-red/00-install/00-run.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -e -# AryaOS run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -install -v -m 755 files/update-nodejs-and-nodered "${ROOTFS_DIR}/usr/local/sbin" diff --git a/stage4-node-red/00-install/01-run-chroot.sh b/stage4-node-red/00-install/01-run-chroot.sh deleted file mode 100755 index f60ae35..0000000 --- a/stage4-node-red/00-install/01-run-chroot.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -e -# AryaOS run-chroot.sh -# -# Node-RED intaller and setup script for AryaOS. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -id node-red || adduser --disabled-password --gecos 'Node-RED Service User' node-red - -# FIXME: I don't think this is required? -usermod -aG sudo node-red -# Let node-red see systemd logs: -usermod -aG adm node-red -# Let node-red get GPU stats: -usermod -aG video node-red -# Let node-red get SDR info: -usermod -aG plugdev node-red - -# Install Node-RED using the node-red installer: -bash /usr/local/sbin/update-nodejs-and-nodered --confirm-install --nodered-user=node-red --confirm-root --no-init - -# Install Node-RED pallet modules: -cd /home/node-red/.node-red -npm install node-red-contrib-tak -npm install node-red-contrib-sitx -npm install node-red-contrib-tfr2cot -npm install node-red-contrib-web-worldmap -npm install node-red-dashboard -npm install node-red-node-ui-table -npm install node-red-contrib-ui-upload -npm install node-red-contrib-qrcode-generator -npm install axios - -mkdir /home/node-red/tmpConf - -chown -R node-red:node-red /home/node-red - -systemctl enable nodered diff --git a/stage4-node-red/00-install/files/update-nodejs-and-nodered b/stage4-node-red/00-install/files/update-nodejs-and-nodered deleted file mode 100644 index 6215410..0000000 --- a/stage4-node-red/00-install/files/update-nodejs-and-nodered +++ /dev/null @@ -1,857 +0,0 @@ -#!/bin/bash -# AryaOS update-nodejs-and-nodered -# Source: https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered -# -# Copyright 2016,2024 JS Foundation and other contributors, https://js.foundation/ -# Copyright 2015,2016 IBM Corp. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Node-RED Installer for DEB based systems - -umask 0022 -tgta12=12.22.12 # need armv6l latest from https://unofficial-builds.nodejs.org/download/release/ -tgtl12=12.16.3 # need x86 latest from https://unofficial-builds.nodejs.org/download/release/ -tgta14=14.21.3 # need armv6l latest from https://unofficial-builds.nodejs.org/download/release/ -tgtl14=14.21.3 # need x86 latest from https://unofficial-builds.nodejs.org/download/release/ -tgta16=16.20.2 # need armv6l latest from https://unofficial-builds.nodejs.org/download/release/ -tgtl16=16.20.2 # need x86 latest from https://unofficial-builds.nodejs.org/download/release/ -tgta18=18.19.0 # need armv6l latest from https://unofficial-builds.nodejs.org/download/release/ -tgtl18=18.4.0 # need x86 latest from https://unofficial-builds.nodejs.org/download/release/ -tgta20=20.11.0 # need armv6l latest from https://unofficial-builds.nodejs.org/download/release/ -# tgtl20=None # need x86 latest from https://unofficial-builds.nodejs.org/download/release/ - -usage() { - cat << EOL -Usage: $0 [options] - -Options: - --help display this help and exit - --confirm-root install as root without asking confirmation - --confirm-install confirm installation without asking confirmation - --confirm-pi confirm installation of PI specific nodes without asking confirmation - --skip-pi skip installing PI specific nodes without asking confirmation - --restart restart service if install succeeds - --allow-low-ports add capability to bind to ports below 1024 (default is disallow) - --update-nodes run npm update on existing installed nodes (within scope of package.json) - --no-init don't ask to initialise settings if they don't exist - --nodered-user specify the user to run as, useful for installing as sudo - e.g. --nodered-user=pi - --nodered-version if not set, the latest version is used - e.g. --nodered-version="3.0.1" - --node16 if set, forces install of major version of nodejs 16 LTS - --node18 if set, forces install of major version of nodejs 18 LTS - --node20 if set, forces install of major version of nodejs 20 LTS - if none set, install nodejs 18 LTS if nodejs version is less than 16, - otherwise leave current install - -Note: if you use allow-low-ports it may affect the node modules paths - see https://stackoverflow.com/a/65560687 -EOL -} - -SUDO=sudo -SUDOE="sudo -E" -NODE_VERSION="" -LOW_PORTS="n" -if [ $# -gt 0 ]; then - # Parsing parameters - while (( "$#" )); do - case "$1" in - --help) - usage && exit 0 - shift - ;; - --confirm-root) - CONFIRM_ROOT="y" - shift - ;; - --confirm-install) - CONFIRM_INSTALL="y" - shift - ;; - --skip-pi) - CONFIRM_PI="n" - shift - ;; - --confirm-pi) - CONFIRM_PI="y" - shift - ;; - --node12) - NODE_VERSION="12" - shift - ;; - --node14) - NODE_VERSION="14" - shift - ;; - --node16) - NODE_VERSION="16" - shift - ;; - --node18) - NODE_VERSION="18" - shift - ;; - --node20) - NODE_VERSION="20" - shift - ;; - --restart) - RESTART="y" - shift - ;; - --update-nodes) - UPDATENODES="y" - shift - ;; - --nodered-version=*) - NODERED_VERSION="${1#*=}" - shift - ;; - --nodered-user=*) - NODERED_USER="${1#*=}" - shift - ;; - --allow-low-ports) - LOW_PORTS="y" - shift - ;; - --no-init) - INITSET="n" - shift - ;; - --) # end argument parsing - shift - break - ;; - -*|--*=) # unsupported flags - echo "Error: Unsupported flag $1" >&2 - exit 1 - ;; - esac - done -fi - -# helper function to test for existance of node and npm -function HAS_NODE { - if [ -x "$(command -v node)" ]; then return 0; else return 1; fi -} -function HAS_NPM { - if [ -x "$(command -v npm)" ]; then return 0; else return 1; fi -} - -# check for apt and systemctrl (set flags for later use and log if not found) -if [ -x "$(command -v apt)" ]; then - APTOK=true; -else - APTOK=false - echo "apt not found. Node/npm install will be skipped" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null -fi -if [ -x "$(command -v systemctl)" ]; then - SYSTEMDOK=true; -else - SYSTEMDOK=false - echo "systemctl not found. shortcuts/services setup will be skipped" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null -fi - -echo -ne "\033[2 q" -if [[ -e /mnt/dietpi_userdata ]]; then - echo -ne "\n\033[1;32mDiet-Pi\033[0m detected - only going to add the \033[0;36mnode-red-start, -stop, -log\033[0m commands.\n" - echo -ne "Flow files and other things worth backing up can be found in the \033[0;36m/mnt/dietpi_userdata/node-red\033[0m directory.\n\n" - echo -ne "Use the \033[0;36mdietpi-software\033[0m command to un-install and re-install \033[38;5;88mNode-RED\033[0m.\n" - echo "journalctl -f -n 100 -u node-red -o cat" > /usr/bin/node-red-log - chmod +x /usr/bin/node-red-log - echo "systemctl stop node-red" > /usr/bin/node-red-stop - chmod +x /usr/bin/node-red-stop - echo "systemctl start node-red" > /usr/bin/node-red-start - echo "journalctl -f -n 0 -u node-red -o cat" >> /usr/bin/node-red-start - chmod +x /usr/bin/node-red-start -else - -if [ "$EUID" == "0" ]; then -# if [[ $SUDO_USER != "" ]]; then - echo -en "\nroot user detected. Typical installs should be done as a regular user.\r\n" - echo -en "If you are running this script using sudo, please cancel and rerun without sudo.\r\n" - echo -en "--nodered-user can be used to specify the user otherwise installation will happen under /root.\r\n" - echo -en "If you know what you are doing as root, please continue.\r\n\r\n" - - yn="${CONFIRM_ROOT}" - [ ! "${yn}" ] && read -t 10 -p "Are you really sure you want to install as root ? (y/N) ? " yn - case $yn in - [Yy]* ) - ;; - * ) - echo " " - exit 1 - ;; - esac - SUDO='' - SUDOE='' - id -u nobody &>/dev/null || adduser --no-create-home --shell /dev/null --disabled-password --disabled-login --gecos '' nobody &>/dev/null -else - groups "$USER" | grep -q '\bsudo\b' && GRS="Y" || GRS="N" - if [[ "$GRS" == "N" ]]; then - echo "User $NODERED_USER not in sudoers group. Exiting" - exit 1; - fi -fi - -# setup user, home and group -if [[ "$NODERED_USER" == "" ]]; then - NODERED_HOME=$HOME - NODERED_USER=$USER - NODERED_GROUP=`id -gn` -else - NODERED_GROUP="$NODERED_USER" - NODERED_HOME="/home/$NODERED_USER" - if [[ "$NODERED_USER" == "root" ]]; then - NODERED_HOME="/root" - fi -fi -SUDOU="sudo -u $NODERED_USER" - -if [[ "$(uname)" != "Darwin" ]]; then -if curl -I https://registry.npmjs.org/@node-red/util >/dev/null 2>&1; then -echo -e '\033]2;'$NODERED_USER@`hostname`: Node-RED update'\007' -echo " " -echo "This script checks the version of node.js installed is 16 or greater. It will try to" -echo "install node 18 if none is found. It can optionally install node 16, 18 or 20 LTS for you." -echo " " -echo "If necessary it will then remove the old core of Node-RED, before then installing the latest" -echo "version. You can also optionally specify the version required." -echo " " -echo "It also tries to run 'npm rebuild' to refresh any extra nodes you have installed" -echo "that may have a native binary component. While this normally works ok, you need" -echo "to check that it succeeds for your combination of installed nodes." -echo " " -echo "To do all this it runs commands as root - please satisfy yourself that this will" -echo "not damage your Pi, or otherwise compromise your configuration." -echo "If in doubt please backup your SD card first." -echo " " -echo "See the optional parameters by re-running this command with --help" -echo " " -if [[ -e $NODERED_HOME/.nvm ]]; then - echo -ne '\033[1mNOTE:\033[0m We notice you are using \033[38;5;88mnvm\033[0m. Please ensure it is running the current LTS version.\n' - echo -ne 'Using nvm is NOT RECOMMENDED. Node-RED will not run as a service under nvm.\r\n\n' -fi - -yn="${CONFIRM_INSTALL}" -[ ! "${yn}" ] && read -p "Are you really sure you want to do this ? [y/N] ? " yn -case $yn in - [Yy]* ) - echo "" - EXTRANODES="" - EXTRAW="update" - - response="${CONFIRM_PI}" - [ ! "${response}" ] && read -r -t 15 -p "Would you like to install the Pi-specific nodes ? [y/N] ? " response - if [[ "$response" =~ ^([yY])+$ ]]; then - EXTRANODES="node-red-node-pi-gpio@latest node-red-node-random@latest node-red-node-ping@latest node-red-contrib-play-audio@latest node-red-node-smooth@latest node-red-node-serialport@latest node-red-contrib-buffer-parser@latest" - EXTRAW="install" - fi - - # this script assumes that $HOME is the folder of the user that runs node-red - # that $NODERED_USER is the user name and the group name to use when running is the - # primary group of that user - # if this is not correct then edit the lines below - MYOS=$(cat /etc/os-release | grep "^ID=" | cut -d = -f 2 | tr -d '"') - GLOBAL="true" - TICK='\033[1;32m\u2714\033[0m' - CROSS='\033[1;31m\u2718\033[0m' - cd "$NODERED_HOME" || exit 1 - clear - echo -e "\nRunning Node-RED $EXTRAW for user $NODERED_USER at $NODERED_HOME on $MYOS\n" - - nv=0 - # nv2="" - nv2=`dpkg -s nodejs 2>/dev/null | grep Version | cut -d ' ' -f 2` - nrv=`echo $NODERED_VERSION | cut -d "." -f1` - - if [[ "$APTOK" == "false" ]]; then - if HAS_NODE && HAS_NPM; then - : # node and npm is installed, we can continue :) - else - if HAS_NODE; then :; else echo -en "\b$CROSS MISSING: nodejs\r\n"; fi - if HAS_NPM; then :; else echo -en "\b$CROSS MISSING: npm\r\n"; fi - echo -en "\b$CROSS MISSING: apt" - echo -e "\r\n\r\nThis script uses apt to install nodejs and npm.\n" - echo -e "You can install nodejs and npm manually then run the script again to continue.\r\n\r\n" - exit 2 - fi - fi - - if [[ "$APTOK" == "true" ]]; then - ndeb=$(apt-cache policy nodejs | grep Installed | awk '{print $2}') - fi - if HAS_NODE && HAS_NPM; then - nv=`node -v | cut -d "." -f1 | cut -d "v" -f2` - nvs=`node -v | cut -d "." -f2` - # nv2=`node -v` - # nv2=`apt list nodejs 2>/dev/null | grep dfsg | cut -d ' ' -f 2 | cut -d '-' -f 1` - echo "Already have nodejs $nv2" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - # ensure ~/.config dir is owned by the user - $SUDO chown -Rf $NODERED_USER:$NODERED_GROUP $NODERED_HOME/.config/ - - echo "OLD nodejs "$nv" :" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "NEW nodejs "$NODE_VERSION" :" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # If older than version of 12.17 then force it to update to support es modules - if [[ "$nv" -eq 12 && "$nvs" -lt 17 ]]; then - nv=0 - NODE_VERSION="12" - fi - - if [[ "$nv" -lt 16 && "$nv" -ne 0 && "$nrv" != 1 ]]; then - if [[ "$NODE_VERSION" == "" ]]; then - echo "Nodejs $nv too old and new version not specified - exiting" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "Node-RED v3.x no longer supports Nodejs $nv " - # echo " Node-RED v2 no longer supports Nodejs $nv. Please update." - # echo " " - # echo " You can use the old v1 branch by specifying --nodered-version=1.*" - echo " " - echo " You can force an install of node 16, 18 or 20 by adding --node18 or --node20 to the end of the command line above." - echo " However doing so may break some nodes that may need re-installing manually." - echo " Generally it is recommended to update all nodes to their latest versions before upgrading." - echo " " - echo " If you wish to stay on nodejs $nv you can update to the latest Node-RED 1.x or 2.x version by adding" - echo ' --nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command. If in doubt this is the safer option.' - if [[ "$npv" != "" ]]; then - echo "Checking for outdated nodes in $PWD" - npm --silent outdated - echo " " - fi - echo " Please backup your installation and flows before upgrading." - echo " " - if ! $SUDO grep -q Raspberry /proc/cpuinfo; then - echo " Note: not all embedded hardware can be updated via this method - please check before proceeding." - echo " " - fi - echo " Exiting now." - exit 2 - fi - echo "Installing nodejs "$NODE_VERSION" over "$nv" ." | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - - time1=$(date) - echo "" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "***************************************" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "Started : "$time1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "Running for user $NODERED_USER at $NODERED_HOME" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne '\r\nThis can take 20-30 minutes on the slower Pi versions - please wait.\r\n\n' - echo -ne ' Stop Node-RED \r\n' - echo -ne ' Remove old version of Node-RED \r\n' - echo -ne ' Remove old version of Node.js \r\n' - echo -ne ' Install Node.js \r\n' - echo -ne ' Clean npm cache \r\n' - echo -ne ' Install Node-RED core \r\n' - echo -ne ' Move global nodes to local \r\n' - echo -ne ' Npm rebuild existing nodes \r\n' - echo -ne ' Install extra Pi nodes \r\n' - echo -ne ' Add shortcut commands \r\n' - echo -ne ' Update systemd script \r\n' - echo -ne ' \r\n' - echo -ne '\r\nAny errors will be logged to /var/log/nodered-install.log\r\n' - echo -ne '\033[14A' - - # stop any running node-red service - if $SUDO service nodered stop 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null ; then CHAR=$TICK; else CHAR=$CROSS; fi - echo -ne " Stop Node-RED $CHAR\r\n" - - # save any global nodes - GLOBALNODES=$(find /usr/local/lib/node_modules/node-red-* -maxdepth 0 -type d -printf '%f\n' 2>/dev/null) - GLOBALNODES="$GLOBALNODES $(find /usr/lib/node_modules/node-red-* -maxdepth 0 -type d -printf '%f\n' 2>/dev/null)" - echo "Found global nodes: $GLOBALNODES :" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - - # remove any old node-red installs or files - if [[ "$APTOK" == "true" ]]; then - $SUDO apt remove -y nodered 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - # sudo apt remove -y node-red-update 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /usr/local/lib/node_modules/node-red* /usr/local/lib/node_modules/npm /usr/local/bin/node-red* /usr/local/bin/node /usr/local/bin/npm 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /usr/lib/node_modules/node-red* /usr/bin/node-red* 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne ' Remove old version of Node-RED \033[1;32m\u2714\033[0m\r\n' - - if [[ "$APTOK" == "false" ]]; then - echo -ne " Node option not possible : Skipped - apt not found\n" - echo -ne " Leave existing Node.js :" - elif [[ "$NODE_VERSION" == "" && "$nv" -ne 0 ]]; then - CHAR="-" - echo -ne " Node option not specified : --node18 or --node20\n" - echo -ne " Leave existing Node.js :" - else - if [[ "$NODE_VERSION" == "12" ]]; then - tgtl=$tgtl12 - tgta=$tgta12 - elif [[ "$NODE_VERSION" == "14" ]]; then - tgtl=$tgtl14 - tgta=$tgta14 - elif [[ "$NODE_VERSION" == "16" ]]; then - tgtl=$tgtl16 - tgta=$tgta16 - elif [[ "$NODE_VERSION" == "18" ]]; then - tgtl=$tgtl18 - tgta=$tgta18 - elif [[ "$NODE_VERSION" == "20" ]]; then - tgtl="None" - tgta=$tgta20 - else - tgtl=$tgtl18 - tgta=$tgta18 - NODE_VERSION="18" - fi - # maybe remove Node.js - or upgrade if nodesource.list exists - if [[ -d $NODERED_HOME/.nvm ]]; then - GLOBAL="false" - echo -ne ' Using NVM to manage Node.js + please run \033[0;36mnvm use lts\033[0m before running Node-RED\r\n' - echo -ne ' NOTE: Using nvm is NOT RECOMMENDED. Node-RED will not run as a service under nvm.\r\n' - export NVM_DIR=$NODERED_HOME/.nvm - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - echo "Using NVM !!! $(nvm current)" 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - nvm install $NODE_VERSION --no-progress --latest-npm >/dev/null 2>&1 - nvm use $NODE_VERSION >/dev/null 2>&1 - nvm alias default $NODE_VERSION >/dev/null 2>&1 - echo "Now using --- $(nvm current)" 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - ln -f -s $NODERED_HOME/.nvm/versions/node/$(nvm current)/lib/node_modules/node-red/red.js $NODERED_HOME/node-red - echo -ne " Update Node.js $NODE_VERSION $CHAR" - elif [[ $(which n) ]]; then - echo "Using n" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Using N to manage Node.js +\r\n" - if $SUDO n $NODE_VERSION 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - echo -ne " Update Node.js $NODE_VERSION $CHAR" - elif [[ "$(uname -m)" =~ "i686" ]] || [[ "$(uname -m)" =~ "x86_64" && "$(getconf LONG_BIT)" =~ "32" ]]; then - echo "Using 32bit nodejs" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if [[ "$tgtl" != "None" ]]; then - curl -sSL -o /tmp/node.tgz https://unofficial-builds.nodejs.org/download/release/v$tgtl/node-v$tgtl-linux-x86.tar.gz 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # unpack it into the correct places - hd=$(head -c 9 /tmp/node.tgz) - if [ "$hd" == "" ]; then - CHAR="$CROSS File $f not downloaded"; - else - if [[ -d /tmp/nodejs ]]; then - $SUDO rm -rf /tmp/nodejs - fi - mkdir -p /tmp/nodejs - $SUDO tar -zxof /tmp/node.tgz --strip-components=1 -C /tmp/nodejs - $SUDO chown -R 0:0 /tmp/nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if $SUDO cp -PR /tmp/nodejs/* /usr/ 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - $SUDO rm -rf /tmp/nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # if $SUDO tar -zxof /tmp/node.tgz --strip-components=1 -C /usr 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - fi - rm /tmp/node.tgz 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Install Node.js for i686 $CHAR" - else - echo -ne " Nodejs 20 for i686 does not exist $CROSS" - fi - elif uname -m | grep -q armv6l ; then - $SUDO apt remove -y nodejs nodejs-legacy npm 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /etc/apt/sources.d/nodesource.list /usr/lib/node_modules/npm* - echo -ne " Remove old version of Node.js $TICK $nv2\r\n" - echo -ne " Install Node.js for Armv6 \r" - # f=$(curl -sL https://nodejs.org/download/release/latest-dubnium/ | grep "armv6l.tar.gz" | cut -d '"' -f 2) - # curl -sL -o node.tgz https://nodejs.org/download/release/latest-dubnium/$f 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - curl -sSL -o /tmp/node.tgz https://unofficial-builds.nodejs.org/download/release/v$tgta/node-v$tgta-linux-armv6l.tar.gz 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # unpack it into the correct places - hd=$(head -c 6 /tmp/node.tgz) - if [ "$hd" == "" ]; then - CHAR="$CROSS File $f not downloaded"; - else - if [[ -d /tmp/nodejs ]]; then - $SUDO rm -rf /tmp/nodejs - fi - mkdir -p /tmp/nodejs - $SUDO tar -zxof /tmp/node.tgz --strip-components=1 -C /tmp/nodejs - $SUDO chown -R 0:0 /tmp/nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if $SUDO cp -PR /tmp/nodejs/* /usr/ 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - $SUDO rm -rf /tmp/nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - # remove the tgz file to save space - rm /tmp/node.tgz 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Install Node.js for Armv6 $CHAR" - else - echo "Installing nodejs $NODE_VERSION" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # clean out old nodejs stuff - npv=$(npm -v 2>/dev/null | head -n 1 | cut -d "." -f1) - $SUDO apt remove -y nodejs nodejs-legacy npm 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO dpkg -r nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO dpkg -r node 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /opt/nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /usr/local/lib/nodejs* 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -f /usr/local/bin/node* 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /usr/local/bin/npm* /usr/local/bin/npx* /usr/lib/node_modules/npm* 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if [ "$npv" = "1" ]; then - $SUDO rm -rf /usr/local/lib/node_modules/node-red* /usr/lib/node_modules/node-red* 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - $SUDO apt -y autoremove 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /etc/apt/sources.list.d/nodesource.list 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO rm -rf /etc/apt/keyrings/nodesource.gpg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Remove old version of Node.js \033[1;32m\u2714\033[0m $nv2\r\n" - echo "Grab the LTS bundle" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Install Node.js $NODE_VERSION LTS \r" - - # block debian nodejs install - echo "Package: nodejs" | $SUDO tee /etc/apt/preferences.d/nodejs.pref >>/dev/null - echo "Pin: release a=stable-security" | $SUDO tee -a /etc/apt/preferences.d/nodejs.pref >>/dev/null - echo "Pin-Priority: -1" | $SUDO tee -a /etc/apt/preferences.d/nodejs.pref >>/dev/null - - # use the official script to install for other debian platforms - $SUDO apt install -y ca-certificates curl gnupg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO mkdir -p /etc/apt/keyrings 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | $SUDOE gpg --batch --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # curl -sSL https://deb.nodesource.com/setup_$NODE_VERSION.x | $SUDOE bash - 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | $SUDOE tee -a /etc/apt/sources.list.d/nodesource.list >>/dev/null - $SUDO apt-get update 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if $SUDO apt install -y nodejs 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - nov2=$(dpkg -s nodejs | grep Version | cut -d ' ' -f 2) - echo -ne " Install Node $nov2 $CHAR" - # echo -ne " Install Node.js $NODE_VERSION LTS $CHAR" - fi - fi - - NUPG=$CHAR - hash -r - rc="" - if nov=$(node -v 2>/dev/null); then :; else rc="ERR"; fi - if npv=$(npm -v 2>/dev/null); then :; else rc="ERR"; fi - if [[ "$npv" == "" ]]; then npv="missing"; fi - if [[ "$nov" == "" ]]; then nov="missing"; fi - - echo -ne "\nVersions: node:$nov npm:$npv\n" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if [[ "$rc" == "" ]]; then - echo -ne " $nov Npm $npv\r\n" - else - echo -ne "\b$CROSS Bad install: Node.js $nov Npm $npv - Exit\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" - exit 2 - fi - if [ "$EUID" == "0" ]; then npm config set unsafe-perm true &>/dev/null; fi - - # clean up the npm cache and node-gyp - if [[ "$NUPG" == "$TICK" ]]; then - if [[ "$GLOBAL" == "true" ]]; then - $SUDO npm cache clean --force 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - else - npm cache clean --force 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - if $SUDO rm -rf "$NODERED_HOME/.node-gyp" "$NODERED_HOME/.npm" /root/.node-gyp /root/.npm; then CHAR=$TICK; else CHAR=$CROSS; fi - fi - echo -ne " Clean npm cache $CHAR\r\n" - - # and install Node-RED - echo "Now install Node-RED $NODERED_VERSION" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - - NODERED_VERSION_SELECTION="" - if [ -z ${NODERED_VERSION} ]; then - NODERED_VERSION_SELECTION="latest" - else - NODERED_VERSION_SELECTION=${NODERED_VERSION} - fi - - if [[ "$GLOBAL" == "true" ]]; then - $SUDO npm i -g --unsafe-perm --no-progress --no-update-notifier --no-audit --no-fund --loglevel=error node-red@"$NODERED_VERSION_SELECTION" 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; nri=${PIPESTATUS[0]} - if [[ $nri -eq 0 ]]; then CHAR=$TICK; else CHAR=$CROSS; fi - else - npm i -g --unsafe-perm --no-progress --no-update-notifier --no-audit --no-fund --loglevel=error node-red@"$NODERED_VERSION_SELECTION" 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; nri=${PIPESTATUS[0]} - if [[ $nri -eq 0 ]]; then CHAR=$TICK; else CHAR=$CROSS; fi - fi - nrv=$(npm -g --no-progress --no-update-notifier --no-audit --no-fund --loglevel=error ls node-red | grep node-red | cut -d '@' -f 2 | $SUDO tee -a /var/log/nodered-install.log) >>/dev/null 2>&1 - echo -ne " Install Node-RED core $CHAR $nrv\r\n" - - # install any nodes, that were installed globally, as local instead - echo "Now create basic package.json for the user and move any global nodes" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - mkdir -p "$NODERED_HOME/.node-red/node_modules" - $SUDO chown -Rf $NODERED_USER:$NODERED_GROUP $NODERED_HOME/.node-red/node_modules 2>&1 >>/dev/null - # Make it more secure by making settings owned by root and removing nopasswd file for default user. - # $SUDO chown -Rf 0:0 $NODERED_HOME/.node-red/settings.js 2>&1 >>/dev/null - # $SUDO rm -f /etc/sudoers.d/010_pi-nopasswd - pushd "$NODERED_HOME/.node-red" 2>&1 >>/dev/null - npm config set update-notifier false 2>&1 >>/dev/null - # npm config set color false 2>&1 >>/dev/null - if [ ! -f "package.json" ]; then - echo '{' > package.json - echo ' "name": "node-red-project",' >> package.json - echo ' "description": "initially created for you by Node-RED '$nrv'",' >> package.json - echo ' "version": "0.0.1",' >> package.json - echo ' "private": true,' >> package.json - echo ' "dependencies": {' >> package.json - echo ' }' >> package.json - echo '}' >> package.json - fi - CHAR="-" - if [[ $GLOBALNODES != " " ]]; then - if npm i --unsafe-perm --save --no-progress --no-update-notifier --no-audit --no-fund $GLOBALNODES 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - fi - echo -ne " Move global nodes to local $CHAR\r\n" - - # try to rebuild any already installed nodes - CHAR="-" - if [[ "$NUPG" == "$TICK" ]]; then - echo -ne "Running npm rebuild\r\n" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if npm rebuild --no-progress --no-update-notifier --no-fund 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - echo -ne " Npm rebuild existing nodes $CHAR\r" - else - echo -ne " Leave existing nodes -\r" - fi - if [[ "$UPDATENODES" == "y" ]]; then - echo -ne "Running npm update\r\n" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Npm update existing nodes " - if npm update --no-progress --no-update-notifier --no-fund 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - echo -ne "$CHAR\r" - fi - echo -ne "\n" - - CHAR="-" - if [[ ! -z $EXTRANODES ]]; then - echo "Installing extra nodes: $EXTRANODES :" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if npm i --unsafe-perm --save --no-progress --no-update-notifier --no-audit --no-fund $EXTRANODES 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - fi - echo -ne " Install extra Pi nodes $CHAR\r\n" - - popd 2>&1 >>/dev/null - if [ -d "$NODERED_HOME/.npm" ]; then - $SUDO chown -Rf $NODERED_USER:$NODERED_GROUP $NODERED_HOME/.npm 2>&1 >>/dev/null - fi - - if [[ "$SYSTEMDOK" == "true" ]]; then - # add the shortcut and start/stop/log scripts to the menu - echo "Now add the shortcut and start/stop/log scripts to the menu" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO mkdir -p /usr/bin - if $SUDO curl -m 60 -f https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-icon.svg >/dev/null 2>&1; then - $SUDO curl -sL -m 60 -o /usr/bin/node-red-start https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-start 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /usr/bin/node-red-stop https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-stop 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /usr/bin/node-red-restart https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-restart 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /usr/bin/node-red-reload https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-reload 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /usr/bin/node-red-log https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-log 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /etc/logrotate.d/nodered https://raw.githubusercontent.com/node-red/linux-installers/master/resources/nodered.rotate 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO chmod +x /usr/bin/node-red-start - $SUDO chmod +x /usr/bin/node-red-stop - $SUDO chmod +x /usr/bin/node-red-restart - $SUDO chmod +x /usr/bin/node-red-reload - $SUDO chmod +x /usr/bin/node-red-log - $SUDO curl -sL -m 60 -o /usr/share/icons/hicolor/scalable/apps/node-red-icon.svg https://raw.githubusercontent.com/node-red/linux-installers/master/resources/node-red-icon.svg 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO curl -sL -m 60 -o /usr/share/applications/Node-RED.desktop https://raw.githubusercontent.com/node-red/linux-installers/master/resources/Node-RED.desktop 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Add shortcut commands $TICK\r\n" - else - echo -ne " Add shortcut commands $CROSS\r\n" - fi - - # add systemd script and configure it for $NODERED_USER - echo "Now add systemd script and configure it for $NODERED_USER:$NODERED_GROUP @ $NODERED_HOME" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - - # check if systemd script already exists - SYSTEMDFILE="/lib/systemd/system/nodered.service" - - if $SUDO curl -sL -m 60 -o ${SYSTEMDFILE}.temp https://raw.githubusercontent.com/node-red/linux-installers/master/resources/nodered.service 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi - # set the memory, User Group and WorkingDirectory in nodered.service - if [ $(cat /proc/meminfo | grep MemTotal | cut -d ":" -f 2 | cut -d "k" -f 1 | xargs) -lt 894000 ]; then mem="256"; else mem="512"; fi - if [ $(cat /proc/meminfo | grep MemTotal | cut -d ":" -f 2 | cut -d "k" -f 1 | xargs) -gt 1894000 ]; then mem="1024"; fi - if [ $(cat /proc/meminfo | grep MemTotal | cut -d ":" -f 2 | cut -d "k" -f 1 | xargs) -gt 3894000 ]; then mem="2048"; fi - - $SUDO sed -i 's#=512#='$mem'#;' ${SYSTEMDFILE}.temp - $SUDO sed -i 's#^User=.*#User='$NODERED_USER'#;s#^Group=.*#Group='$NODERED_GROUP'#;s#^WorkingDirectory=.*#WorkingDirectory='$NODERED_HOME'#;s#^EnvironmentFile=-.*#EnvironmentFile=-'$NODERED_HOME'/.node-red/EnvironmentFile#;' ${SYSTEMDFILE}.temp - - if test -f "$SYSTEMDFILE"; then - # there's already a systemd script - EXISTING_FILE=$(md5sum $SYSTEMDFILE | awk '$1 "${SYSTEMDFILE}" {print $1}'); - TEMP_FILE=$(md5sum ${SYSTEMDFILE}.temp | awk '$1 "${SYSTEMDFILE}.temp" {print $1}'); - - if [[ $EXISTING_FILE == $TEMP_FILE ]]; - then - : # silent procedure - else - echo "Customized systemd script found @ $SYSTEMDFILE. To prevent loss of modifications, we'll not recreate the systemd script." | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "If you want the installer to recreate the systemd script, please delete or rename the current script & re-run the installer." | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - CHAR="- Skipped - existing script is customized." - fi - $SUDO rm ${SYSTEMDFILE}.temp - else - $SUDO mv ${SYSTEMDFILE}.temp $SYSTEMDFILE - fi - - $SUDO systemctl daemon-reload 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo -ne " Update systemd script $CHAR\r\n" - else - echo -ne " Add shortcut commands : Skipped - systemd not found\r\n" - echo -ne " Update systemd script : Skipped - systemd not found\r\n" - fi - $SUDO ln -s $(which python3) /usr/bin/python 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - - # remove unneeded large sentiment library to save space and load time - $SUDO rm -f /usr/lib/node_modules/node-red/node_modules/multilang-sentiment/build/output/build-all.json 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - # on LXDE add launcher to top bar, refresh desktop menu - pfile=/home/$NODERED_USER/.config/lxpanel/LXDE-pi/panels/panel - if [ -e $pfile ]; then - if ! grep -q "Node-RED" $file; then - mat="lxterminal.desktop" - ins="lxterminal.desktop\n }\n Button {\n id=Node-RED.desktop" - $SUDO sed -i "s|$mat|$ins|" $pfile 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if xhost >& /dev/null ; then - export DISPLAY=:0 && lxpanelctl restart 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - fi - fi - - # on Pi, add launcher to top bar, add cpu temp example, make sure ping works - echo "Now add launcher to top bar, add cpu temp example, make sure ping works" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if $SUDO grep -q Raspberry /proc/cpuinfo; then - # $SUDO setcap cap_net_raw+eip $(eval readlink -f `which node`) 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO adduser $NODERED_USER gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - FAM=$(cat /etc/issue | cut -d ' ' -f 1) - ISS=$(cat /etc/issue | cut -d '/' -f 2 | cut -d ' ' -f 2) - if [[ "$FAM" == *"bian" ]]; then - if (($ISS > 11)); then - echo "Replace old rpi.gpio with lgpio" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO apt purge -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO apt install -y python3-pip 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO pip3 install --break-system-packages rpi-lgpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - else - echo "Leaving old rpi.gpio" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - $SUDO apt install -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - fi - fi - $SUDO setcap cap_net_raw=ep /bin/ping 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - - echo "Allow binding to low ports : $LOW_PORTS" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - if [[ "$LOW_PORTS" == "y" ]] ; then - $SUDO setcap cap_net_bind_service=+ep $(eval readlink -f `which node`) 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - - echo -ne "\r\n\r\n\r\n" - echo -ne "All done.\r\n" - if [[ "$RESTART" == "y" ]]; then - echo -ne "\033[1mRestarting \033[38;5;88mNode-RED\033[0m service\r\n" - $SUDO systemctl restart nodered - echo -ne "\033[1mRestarted \033[38;5;88mNode-RED\033[0m\r\n" - else - if [[ "$GLOBAL" == "true" ]] ; then - if [[ "$SYSTEMDOK" == "true" ]]; then - echo -ne "You can now start Node-RED with the command \033[0;36mnode-red-start\033[0m\r\n" - echo -ne " or using the icon under Menu / Programming / Node-RED\r\n" - else - echo -ne "You can now start Node-RED with the command \033[0;36mnode-red\033[0m\r\n" - fi - else - echo -ne "You can now start Node-RED with the command \033[0;36m./node-red\033[0m\r\n" - fi - fi - echo -ne "Then point your browser to \033[0;36mlocalhost:1880\033[0m or \033[0;36mhttp://{your_pi_ip-address}:1880\033[0m\r\n" - echo -ne "\r\n" - if free -h -t >/dev/null 2>&1; then - echo "Memory : $(free -h -t | grep Total | awk '{print $2}' | cut -d i -f 1)" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - else - echo "Mem : $(free -m | grep Mem | awk '{print $2}' | cut -d i -f 1)Mb" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - echo "Swap : $(free -m | grep Swap | awk '{print $2}' | cut -d i -f 1)Mb" | $SUDO tee -a /var/log/nodered-install.log >>/dev/null - fi - echo "Started : $time1 " | $SUDO tee -a /var/log/nodered-install.log - echo "Finished: $(date)" | $SUDO tee -a /var/log/nodered-install.log - - file=/home/$NODERED_USER/.node-red/settings.js - if [[ "$NODERED_USER" == "root" ]]; then - file=/root/.node-red/settings.js - fi - if [ ! -f $file ]; then - echo " " - elif ! diff -q /usr/lib/node_modules/node-red/settings.js $file &>/dev/null 2>&1 ; then - echo " " - echo "Just FYI : Your settings.js file is different from the latest defaults." - echo "You may wish to run" - echo " diff -y --suppress-common-lines /usr/lib/node_modules/node-red/settings.js $file" - echo "to compare them and see what the latest options are." - echo " " - fi - - echo "**********************************************************************************" - echo " ### WARNING ###" - echo " DO NOT EXPOSE NODE-RED TO THE OPEN INTERNET WITHOUT SECURING IT FIRST" - echo " " - echo " Even if your Node-RED doesn't have anything valuable, (automated) attacks will" - echo " happen and could provide a foothold in your local network" - echo " " - echo " Follow the guide at https://nodered.org/docs/user-guide/runtime/securing-node-red" - echo " to setup security." - echo " " - echo " ### ADDITIONAL RECOMMENDATIONS ###" - if [ -f /etc/sudoers.d/010_pi-nopasswd ]; then - echo " - Remove the /etc/sudoers.d/010_pi-nopasswd file to require entering your password" - echo " when performing any sudo/root commands:" - echo " " - echo " sudo rm -f /etc/sudoers.d/010_pi-nopasswd" - echo " " - fi - if [ ! -f $file ]; then - echo " - You can customise the initial settings by running:" - echo " " - echo " node-red admin init" - echo " " - echo " - After running Node-RED for the first time, change the ownership of the settings" - echo " file to 'root' to prevent unauthorised changes:" - echo " " - echo " sudo chown root:root ~/.node-red/settings.js" - echo " " - elif ! [[ $(stat --format '%G' ~/.node-red/settings.js) = "root" ]]; then - echo " - Change the ownership of its settings file to 'root' to prevent unauthorised changes:" - echo "" - echo " sudo chown root:root ~/.node-red/settings.js" - echo " " - fi - if [ "$EUID" == "0" ]; then - echo " - Do not run Node-RED as root or an administraive account" - echo " " - fi - echo "**********************************************************************************" - echo " " - if [ ! -f $file ]; then - initset="${INITSET}" - # [ ! "${INITSET}" ] && read -t 60 -p " Would you like to customise the settings now (y/N) ? " initset - case $initset in - [Yy]* ) - export HOSTIP=`hostname -I | cut -d ' ' -f 1` - $SUDO chown -Rf $NODERED_USER:$NODERED_GROUP $NODERED_HOME/.node-red 2>&1 >>/dev/null - $SUDOU /usr/bin/node-red admin init - $SUDO chown 0:0 $file - ;; - [Nn]* ) - echo "Settings not initialized." - exit 0 - ;; - * ) - # echo " " - # exit 1 - $SUDO chown -Rf $NODERED_USER:$NODERED_GROUP $NODERED_HOME/.node-red/ 2>&1 >>/dev/null - $SUDOU /usr/bin/node-red admin init - $SUDO chown 0:0 $file - ;; - esac - fi - ;; - * ) - echo " " - exit 1 - ;; -esac -else -echo " " -echo "Sorry - cannot connect to internet - not going to touch anything." -echo "https://www.npmjs.com/package/node-red is not reachable." -echo "Please ensure you have a working internet connection." -echo "Return code from curl is "$? -echo " " -exit 1 -fi -else -echo " " -echo "Sorry - I'm not supposed to be run on a Mac." -echo "Please see the documentation at http://nodered.org/docs/getting-started/upgrading." -echo " " -exit 1 -fi -fi diff --git a/stage4-node-red/prerun.sh b/stage4-node-red/prerun.sh deleted file mode 100755 index bb741e2..0000000 --- a/stage4-node-red/prerun.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e -# AryaOS prerun.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage5-common/00-install/00-run.sh b/stage5-common/00-install/00-run.sh deleted file mode 100755 index 377db91..0000000 --- a/stage5-common/00-install/00-run.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -function gen_aos_service_sudoers() { - SERVICES=${1:-$AOS_SERVICES} - for srv in ${SERVICES}; do - echo "node-red ALL=(root) NOPASSWD: /bin/systemctl disable ${srv}" - echo "node-red ALL=(root) NOPASSWD: /bin/systemctl enable ${srv}" - echo "node-red ALL=(root) NOPASSWD: /bin/systemctl start ${srv}" - echo "node-red ALL=(root) NOPASSWD: /bin/systemctl stop ${srv}" - echo "node-red ALL=(root) NOPASSWD: /bin/systemctl restart ${srv}" - done -} - -# Captive portal / main page -mkdir -p "${ROOTFS_DIR}/var/www/" -rsync -va files/html/ "${ROOTFS_DIR}/var/www/html/" -rsync -va files/calfire_airbases/ "${ROOTFS_DIR}/var/www/html/calfire_airbases/" -chmod +x "${ROOTFS_DIR}/var/www/html" - -install -v -m 755 files/wifi-nuke.py "${ROOTFS_DIR}/usr/local/sbin/wifi-nuke.py" - -# Node-RED -install -v -m 644 files/AryaOS_flows.json "${ROOTFS_DIR}/home/node-red/.node-red/" -cat "${ROOTFS_DIR}/home/node-red/.node-red/AryaOS_flows.json" > "${ROOTFS_DIR}/home/node-red/.node-red/flows.json" - -install -v -m 640 files/node-red.sudoers "${ROOTFS_DIR}/etc/sudoers.d/node-red" -SUDO_SERVICES="dump1090-fa dump978-fa gpsd comitup aiscatcher AISCOT LINCOT ADSBCOT DroneCOT ${AOS_SERVICES} AryaSea AryaAir AryaUAS readsb" -gen_aos_service_sudoers "${SUDO_SERVICES}" >> "${ROOTFS_DIR}/etc/sudoers.d/node-red" - -# FIXME: Disabled to work-around https://github.com/snstac/aryaos/issues/56 -# visudo -c "${ROOTFS_DIR}/etc/sudoers.d/node-red" - -# LINCOT tracker -install -v -m 755 files/get_position.sh "${ROOTFS_DIR}/usr/local/bin/" - -APP_NAME="LINCOT" -install -v -m 644 "files/${APP_NAME}-config.txt" "${ROOTFS_DIR}/boot/" -install -v -m 755 "files/run_${APP_NAME}.sh" "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 644 "files/${APP_NAME}.service" "${ROOTFS_DIR}/lib/systemd/system/" diff --git a/stage5-common/00-install/01-run-chroot.sh b/stage5-common/00-install/01-run-chroot.sh deleted file mode 100755 index e87b1eb..0000000 --- a/stage5-common/00-install/01-run-chroot.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -python3 -m pip install lincot --break-system-packages - -systemctl enable NetworkManager-dispatcher - -id lincot || useradd --system lincot - -sed --follow-symlinks -i -E -e "s/blank.org/aryaos.local/" /usr/share/comitup/web/templates/connect.html -# sed --follow-symlinks -i -E -e "s/aryaos.local/${AT_FLAVOR}.local/" /var/www/html/index.html - -# sed --follow-symlinks -i -E -e "s/flows.json/AryaOS_flows.json/" /home/node-red/.node-red/settings.js - -#sed --follow-symlinks -i -E -e "s/flowFile:.*,/flowFile: 'AryaOS_flows.json',/" /home/node-red/.node-red/settings.js - -mkdir -p /var/www/html/logs -chown node-red /var/www/html/logs diff --git a/stage5-common/00-install/files/LINCOT.service b/stage5-common/00-install/files/LINCOT.service deleted file mode 100644 index ade8ba0..0000000 --- a/stage5-common/00-install/files/LINCOT.service +++ /dev/null @@ -1,35 +0,0 @@ -# AryaOS LINCOT.service -# -# LINCOT service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=LINCOT Linux GPSD to TAK Gateway -Documentation=https://github.com/SNSTAC/LINCOT -Wants=network.target -After=network.target - -[Service] -User=lincot -Type=simple -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_LINCOT.sh -SyslogIdentifier=LINCOT -KillSignal=SIGINT -Restart=on-failure -RestartSec=20 - -[Install] -WantedBy=default.target diff --git a/stage5-common/00-install/files/get_position.sh b/stage5-common/00-install/files/get_position.sh deleted file mode 100755 index cdfc803..0000000 --- a/stage5-common/00-install/files/get_position.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -e -# AryaOS get_position.sh -# -# Get the static position of the system (bypass gps). -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -if [-f $AOS_CONFIG ]; then - . $AOS_CONFIG -else - echo "$AOS_CONFIG doesn't exist, exiting." - exit 1 -fi - -echo "{\"class\": \"TPV\", \"lat\": $STATIC_LAT, \"lon\": $STATIC_LON, \"altHAE\": $STATIC_ALT, \"track\": \"9999999.0\", \"speed\": \"9999999.0\"}" diff --git a/stage5-common/00-install/files/run_LINCOT.sh b/stage5-common/00-install/files/run_LINCOT.sh deleted file mode 100755 index 88e251b..0000000 --- a/stage5-common/00-install/files/run_LINCOT.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# AryaOS run_LINCOT.sh -# -# Startup file for LINCOT. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -else - echo "$AOS_CONFIG doesn't exist, exiting." - exit 1 -fi - -LINCOT_CONF="/boot/LINCOT-config.txt" - -if [ -f $LINCOT_CONF ]; then - . $LINCOT_CONF -else - echo "$LINCOT_CONF doesn't exist, initializing." - echo 'CALLSIGN=""' >> $LINCOT_CONF -fi - -if ! grep -qs -e 'CALLSIGN' $LINCOT_CONF; then - echo "Adding empty CALLSIGN to $LINCOT_CONF" - echo 'CALLSIGN=""' >> $LINCOT_CONF -fi - -if [ -z "$NODE_ID" ]; then - echo "NODE_ID not set, will retry..." - exit 1 -fi - -if [ -z "$CALLSIGN" ]; then - echo "CALLSIGN not set" - NEW_CALLSIGN="${AOS_FLAVOR:-AryaOS}-${NODE_ID: -4}" - sed --follow-symlinks -i -E -e "s/CALLSIGN.*/CALLSIGN=$NEW_CALLSIGN/" $LINCOT_CONF - logger "AryaOS LINCOT callsign is now set to: $NEW_CALLSIGN" - export CALLSIGN=$NEW_CALLSIGN -fi - -set +a - -/usr/local/bin/lincot diff --git a/stage5-common/00-install/files/run_lincot.sh b/stage5-common/00-install/files/run_lincot.sh deleted file mode 100755 index 88e251b..0000000 --- a/stage5-common/00-install/files/run_lincot.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# AryaOS run_LINCOT.sh -# -# Startup file for LINCOT. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -else - echo "$AOS_CONFIG doesn't exist, exiting." - exit 1 -fi - -LINCOT_CONF="/boot/LINCOT-config.txt" - -if [ -f $LINCOT_CONF ]; then - . $LINCOT_CONF -else - echo "$LINCOT_CONF doesn't exist, initializing." - echo 'CALLSIGN=""' >> $LINCOT_CONF -fi - -if ! grep -qs -e 'CALLSIGN' $LINCOT_CONF; then - echo "Adding empty CALLSIGN to $LINCOT_CONF" - echo 'CALLSIGN=""' >> $LINCOT_CONF -fi - -if [ -z "$NODE_ID" ]; then - echo "NODE_ID not set, will retry..." - exit 1 -fi - -if [ -z "$CALLSIGN" ]; then - echo "CALLSIGN not set" - NEW_CALLSIGN="${AOS_FLAVOR:-AryaOS}-${NODE_ID: -4}" - sed --follow-symlinks -i -E -e "s/CALLSIGN.*/CALLSIGN=$NEW_CALLSIGN/" $LINCOT_CONF - logger "AryaOS LINCOT callsign is now set to: $NEW_CALLSIGN" - export CALLSIGN=$NEW_CALLSIGN -fi - -set +a - -/usr/local/bin/lincot diff --git a/stage5-common/prerun.sh b/stage5-common/prerun.sh deleted file mode 100755 index 9acd13c..0000000 --- a/stage5-common/prerun.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage6-air/00-sys-tweaks/00-run-chroot.sh b/stage6-air/00-sys-tweaks/00-run-chroot.sh deleted file mode 100755 index 13902df..0000000 --- a/stage6-air/00-sys-tweaks/00-run-chroot.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -apt update - -systemctl disable dphys-swapfile.service -systemctl disable apt-daily.timer -systemctl disable apt-daily-upgrade.timer -systemctl disable man-db.timer - -mv /etc/cron.hourly/fake-hwclock /etc/cron.daily || true - -pushd /etc/cron.daily -rm -f apt-compat bsdmainutils dpkg man-db -popd - -if ! grep -qs -e '/tmp' /etc/fstab; then - sed -i -E -e 's/(vfat *defaults) /\1,noatime/g' /etc/fstab -cat >> /etc/fstab </dev/null || true -systemctl disable --now dump978-fa &>/dev/null || true -systemctl disable --now ADSBCOT &>/dev/null || true -systemctl disable --now AryaAir &>/dev/null || true -systemctl disable --now readsb &>/dev/null || true -systemctl disable --now readsb-mutability &>/dev/null || true -systemctl disable --now dump1090-mutability &>/dev/null || true -systemctl disable --now dump1090 &>/dev/null || true -systemctl disable --now tar1090 &>/dev/null || true -systemctl disable --now skyaware &>/dev/null || true diff --git a/stage6-air/04-aryaair/files/ADSBCOT.service b/stage6-air/04-aryaair/files/ADSBCOT.service deleted file mode 100644 index 2787362..0000000 --- a/stage6-air/04-aryaair/files/ADSBCOT.service +++ /dev/null @@ -1,37 +0,0 @@ -# AryaOS ADSBCOT.service -# -# ADSBCOT service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=ADSBCOT: ADS-B to TAK Gateway -Documentation=https://github.com/SNSTAC/ADSBCOT -PartOf=AryaAir.service -After=AryaAir.service - -[Service] -User=adsbcot -RuntimeDirectory=ADSBCOT -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_ADSBCOT.sh -SyslogIdentifier=ADSBCOT -Type=simple -Restart=always -RestartSec=20 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaAir.service diff --git a/stage6-air/04-aryaair/files/dump1090-fa.service b/stage6-air/04-aryaair/files/dump1090-fa.service deleted file mode 100644 index 1d9eb4b..0000000 --- a/stage6-air/04-aryaair/files/dump1090-fa.service +++ /dev/null @@ -1,37 +0,0 @@ -# AryaOS dump1090-fa.service -# dump1090-fa service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -[Unit] -Description=dump1090-fa ADS-B receiver -Documentation=https://flightaware.com/adsb/piaware/ -PartOf=AryaAir.service -After=AryaAir.service - -[Service] -User=dump1090 -RuntimeDirectory=adsb -RuntimeDirectoryMode=0755 -ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json /run/adsb -SyslogIdentifier=dump1090-fa -Type=simple -Restart=on-failure -RestartSec=30 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaAir.service \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/dump978-fa.service b/stage6-air/04-aryaair/files/dump978-fa.service deleted file mode 100644 index cafd3af..0000000 --- a/stage6-air/04-aryaair/files/dump978-fa.service +++ /dev/null @@ -1,35 +0,0 @@ -# AryaOS dump978-fa.service -# dump978-fa service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -[Unit] -Description=dump978-fa ADS-B UAT receiver -Documentation=https://flightaware.com/adsb/piaware/ -Wants=AryaAir.target -After=AryaAir.target - -[Service] -User=dump978 -ExecStart=/usr/share/dump978-fa/start-dump978-fa -SyslogIdentifier=dump978-fa -Type=simple -Restart=on-failure -RestartSec=30 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaAir.service \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/enable_AryaAir-dump1090-fa.sh b/stage6-air/04-aryaair/files/enable_AryaAir-dump1090-fa.sh deleted file mode 100755 index a47e1fa..0000000 --- a/stage6-air/04-aryaair/files/enable_AryaAir-dump1090-fa.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# AryaOS enable_AryaAir.sh -# -# Enables AryaAir-dump1090-fa services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -set +a -logger "Enabling AryaAir+dump1090-fa services." -systemctl enable AryaAir --now -systemctl enable dump1090-fa --now -systemctl disable readsb --now -systemctl enable dump978-fa --now -systemctl enable ADSBCOT --now -systemctl enable LINCOT --now diff --git a/stage6-air/04-aryaair/files/enable_AryaAir-readsb.sh b/stage6-air/04-aryaair/files/enable_AryaAir-readsb.sh deleted file mode 100755 index d15dbd3..0000000 --- a/stage6-air/04-aryaair/files/enable_AryaAir-readsb.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# AryaOS enable_AryaAir-readsb.sh -# -# Enables AryaAir services using readsb. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -set +a -logger "Enabling AryaAir+readsb services." -systemctl enable AryaAir --now -systemctl enable readsb --now -systemctl disable dump1090-fa --now -systemctl enable dump978-fa --now -systemctl enable ADSBCOT --now -systemctl enable LINCOT --now diff --git a/stage6-air/04-aryaair/files/readsb-config.txt b/stage6-air/04-aryaair/files/readsb-config.txt deleted file mode 100644 index b9b313c..0000000 --- a/stage6-air/04-aryaair/files/readsb-config.txt +++ /dev/null @@ -1,26 +0,0 @@ -# AryaOS readsb-config.txt -# -# readsb Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -RECEIVER_OPTIONS="--device=stx:1090:0 --device-type rtlsdr --gain -10 --ppm 0" - -DECODER_OPTIONS="--max-range 450 --write-json-every 1" - -NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1250 --net-ro-interval 0.05 --net-ri-port 30001 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005" - -JSON_OPTIONS="--json-location-accuracy 2 --range-outline-hours 24" - -ADSB_JSON="/run/adsb" \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/readsb-gain.sh b/stage6-air/04-aryaair/files/readsb-gain.sh deleted file mode 100644 index ed8afdb..0000000 --- a/stage6-air/04-aryaair/files/readsb-gain.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -READSB_CONFIG="/boot/readsb-config.txt" - -validre='^(-10|[0-9]+([.][0-9]+)?)$' -gain=$(echo $1 | tr -cd '[:digit:].-') - -if ! [[ $gain =~ $validre ]] ; then echo "Error, invalid gain!"; exit 1; fi -if ! grep gain $READSB_CONFIG &>/dev/null; then sudo sed -i -e 's/RECEIVER_OPTIONS="/RECEIVER_OPTIONS="--gain 49.6 /' $READSB_CONFIG; fi - - -sed -i -E -e "s/--gain .?[0-9]*.?[0-9]* /--gain $gain /" $READSB_CONFIG - -echo "Don't forget to: sudo systemctl restart readsb" diff --git a/stage6-air/04-aryaair/files/readsb-install.sh b/stage6-air/04-aryaair/files/readsb-install.sh deleted file mode 100644 index a9e1263..0000000 --- a/stage6-air/04-aryaair/files/readsb-install.sh +++ /dev/null @@ -1,294 +0,0 @@ -#!/bin/bash -umask 022 - - -set -e -trap 'echo "[ERROR] Error in line $LINENO when executing: $BASH_COMMAND"' ERR -renice 10 $$ - -# if [ -f /boot/piaware-config.txt ]; then -# echo -------- -# echo "You are using the piaware image, this setup script would mess up the configuration." -# echo -------- -# echo "Exiting." -# exit 1 -# fi - -for arg in "$@" -do - case "$arg" in - push-30004) - push_30004=yes - ;; - no-tar1090) - NO_TAR1090=yes - ;; - *) - MAKE_ARGS=yes - ;; - esac -done - -function copyNoClobber() { - if ! [[ -f "$2" ]]; then - cp "$1" "$2" - fi -} - -repository="https://github.com/wiedehopf/readsb.git" - - -# if [[ -f /usr/lib/fr24/fr24feed_updater.sh ]]; then -# #fix readonly remount logic in fr24feed update script, doesn't do anything when fr24 is not installed -# mount -o remount,rw / -# sed -i -e 's?$(mount | grep " on / " | grep rw)?{ mount | grep " on / " | grep rw; }?' /usr/lib/fr24/fr24feed_updater.sh -# fi - -# # blacklist kernel driver as on ancient systems -# if grep -E 'wheezy|jessie' /etc/os-release -qs; then -# echo -e 'blacklist rtl2832\nblacklist dvb_usb_rtl28xxu\n' > /etc/modprobe.d/blacklist-rtl-sdr.conf -# rmmod rtl2832 &>/dev/null || true -# rmmod dvb_usb_rtl28xxu &>/dev/null || true -# fi - -ipath=/usr/local/share/adsb-wiki/readsb-install -mkdir -p $ipath - -# if grep -E 'wheezy|jessie' /etc/os-release -qs; then -# # make sure the rtl-sdr rules are present on ancient systems -# wget -O /tmp/rtl-sdr.rules https://raw.githubusercontent.com/wiedehopf/adsb-scripts/master/osmocom-rtl-sdr.rules -# cp /tmp/rtl-sdr.rules /etc/udev/rules.d/ -# fi - -function aptInstall() { - if ! apt install -y --no-install-recommends --no-install-suggests "$@" &>/dev/null; then - apt update - apt install -y --no-install-recommends --no-install-suggests "$@" - fi -} - -if command -v apt &>/dev/null; then - packages=(git gcc make libusb-1.0-0-dev ncurses-dev ncurses-bin zlib1g-dev zlib1g pkg-config) - if ! grep -E 'wheezy|jessie' /etc/os-release -qs; then - packages+=(libzstd-dev libzstd1) - fi - if ! command -v nginx &>/dev/null && [[ -z "$NO_TAR1090" ]] ; then - packages+=(lighttpd) - fi - aptInstall "${packages[@]}" -fi -if command -v apt &>/dev/null; then - packages=(librtlsdr-dev librtlsdr0) - aptInstall "${packages[@]}" || true # hope for the best -fi - -udevadm control --reload-rules || true - -function getGIT() { - # getGIT $REPO $BRANCH $TARGET-DIR - if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then - echo "getGIT wrong usage, check your script or tell the author!" 1>&2 - return 1 - fi - if ! cd "$3" &>/dev/null || ! git fetch --depth 2 origin "$2" || ! git reset --hard FETCH_HEAD; then - if ! rm -rf "$3" || ! git clone --depth 2 --single-branch --branch "$2" "$1" "$3"; then - return 1 - fi - fi - return 0 -} -BRANCH="stale" -if grep -E 'wheezy|jessie' /etc/os-release -qs; then - BRANCH="jessie" -fi -if ! getGIT "$repository" "$BRANCH" "$ipath/git" -then - echo "Unable to git clone the repository" - exit 1 -fi - -rm -rf "$ipath"/readsb*.deb -cd "$ipath/git" - -make clean -THREADS=$(( $(grep -c ^processor /proc/cpuinfo) - 1 )) -THREADS=$(( THREADS > 0 ? THREADS : 1 )) -CFLAGS="-O2 -march=native" - -# disable unaligned access for arm 32bit ... -if uname -m | grep -qs -e arm -e aarch64 && gcc -mno-unaligned-access hello.c -o /dev/null &>/dev/null; then - CFLAGS+=" -mno-unaligned-access" -fi - -if [[ $1 == "sanitize" ]]; then - CFLAGS+="-fsanitize=address -static-libasan" - if ! make "-j${THREADS}" AIRCRAFT_HASH_BITS=16 RTLSDR=yes OPTIMIZE="$CFLAGS"; then - if grep -qs /etc/os-release 'bookworm'; then apt install -y libasan8; - elif grep -qs /etc/os-release 'bullseye'; then apt install -y libasan6; - elif grep -qs /etc/os-release 'buster'; then apt install -y libasan5; - fi - make "-j${THREADS}" AIRCRAFT_HASH_BITS=16 RTLSDR=yes OPTIMIZE="$CFLAGS" - fi -else - if [[ -n "$MAKE_ARGS" ]]; then - make "-j${THREADS}" AIRCRAFT_HASH_BITS=16 RTLSDR=yes OPTIMIZE="$CFLAGS" "$@" - else - make "-j${THREADS}" AIRCRAFT_HASH_BITS=16 RTLSDR=yes OPTIMIZE="$CFLAGS" - fi -fi - -# cp -f debian/readsb.service /lib/systemd/system/readsb.service - -rm -f /usr/bin/readsb /usr/bin/viewadsb -cp -f readsb /usr/bin/readsb -cp -f viewadsb /usr/bin/viewadsb - -# copyNoClobber debian/readsb.default /etc/default/readsb - -if ! id -u readsb &>/dev/null -then - adduser --system --home $ipath --no-create-home --quiet readsb || adduser --system --home-dir $ipath --no-create-home readsb - adduser readsb plugdev || true # USB access - adduser readsb dialout || true # serial access -fi - -# apt remove -y dump1090-fa &>/dev/null || true -# systemctl disable --now dump1090-mutability &>/dev/null || true -# systemctl disable --now dump1090 &>/dev/null || true - -# rm -f /etc/lighttpd/conf-enabled/89-dump1090.conf - -# configure rbfeeder to use readsb - -# if [[ -f /etc/rbfeeder.ini ]]; then -# systemctl stop rb-feeder &>/dev/null || true -# copyNoClobber /etc/rbfeeder.ini /usr/local/share/adsb-wiki || true -# sed -i -e '/network_mode/d' -e '/\[network\]/d' -e '/mode=/d' -e '/external_port/d' -e '/external_host/d' /etc/rbfeeder.ini -# sed -i -e 's/\[client\]/\0\nnetwork_mode=true/' /etc/rbfeeder.ini -# cat >>/etc/rbfeeder.ini <<"EOF" -# [network] -# mode=beast -# external_port=30005 -# external_host=127.0.0.1 -# EOF -# pkill -9 rbfeeder || true -# systemctl restart rbfeeder &>/dev/null || true -# fi - -# # configure fr24feed to use readsb - -# if [ -f /etc/fr24feed.ini ] -# then -# systemctl stop fr24feed &>/dev/null || true -# chmod a+rw /etc/fr24feed.ini || true -# apt-get install -y dos2unix &>/dev/null && dos2unix /etc/fr24feed.ini &>/dev/null || true -# copyNoClobber /etc/fr24feed.ini /usr/local/share/adsb-wiki || true - -# if ! grep -e 'host=' /etc/fr24feed.ini &>/dev/null; then echo 'host=' >> /etc/fr24feed.ini; fi -# if ! grep -e 'receiver=' /etc/fr24feed.ini &>/dev/null; then echo 'receiver=' >> /etc/fr24feed.ini; fi - -# sed -i -e 's/receiver=.*/receiver="beast-tcp"/' -e 's/host=.*/host="127.0.0.1:30005"/' \ -# -e 's/mlat=.*/mlat="no"/' -e 's/bs=.*/bs="no"/' -e 's/raw=.*/raw="no"/' /etc/fr24feed.ini - -# # systemctl restart fr24feed &>/dev/null || true -# fi - -# systemctl enable readsb -# systemctl restart readsb || true - -# script to change gain - -# mkdir -p /usr/local/bin -# cat >/usr/local/bin/readsb-gain <<"EOF" -# #!/bin/bash -# validre='^(-10|[0-9]+([.][0-9]+)?)$' -# gain=$(echo $1 | tr -cd '[:digit:].-') -# if ! [[ $gain =~ $validre ]] ; then echo "Error, invalid gain!"; exit 1; fi -# if ! grep gain /etc/default/readsb &>/dev/null; then sudo sed -i -e 's/RECEIVER_OPTIONS="/RECEIVER_OPTIONS="--gain 49.6 /' /etc/default/readsb; fi -# sudo sed -i -E -e "s/--gain .?[0-9]*.?[0-9]* /--gain $gain /" /etc/default/readsb -# sudo systemctl restart readsb -# EOF -# chmod a+x /usr/local/bin/readsb-gain - - -# set-location -# cat >/usr/local/bin/readsb-set-location <<"EOF" -# #!/bin/bash - -# lat=$(echo $1 | tr -cd '[:digit:].-') -# lon=$(echo $2 | tr -cd '[:digit:].-') - -# if ! awk "BEGIN{ exit ($lat > 90) }" || ! awk "BEGIN{ exit ($lat < -90) }"; then -# echo -# echo "Invalid latitude: $lat" -# echo "Latitude must be between -90 and 90" -# echo -# echo "Example format for latitude: 51.528308" -# echo -# echo "Usage:" -# echo "readsb-set-location 51.52830 -0.38178" -# echo -# exit 1 -# fi -# if ! awk "BEGIN{ exit ($lon > 180) }" || ! awk "BEGIN{ exit ($lon < -180) }"; then -# echo -# echo "Invalid longitude: $lon" -# echo "Longitude must be between -180 and 180" -# echo -# echo "Example format for latitude: -0.38178" -# echo -# echo "Usage:" -# echo "readsb-set-location 51.52830 -0.38178" -# echo -# exit 1 -# fi - -# echo -# echo "setting Latitude: $lat" -# echo "setting Longitude: $lon" -# echo -# if ! grep -e '--lon' /etc/default/readsb &>/dev/null; then sed -i -e 's/DECODER_OPTIONS="/DECODER_OPTIONS="--lon -0.38178 /' /etc/default/readsb; fi -# if ! grep -e '--lat' /etc/default/readsb &>/dev/null; then sed -i -e 's/DECODER_OPTIONS="/DECODER_OPTIONS="--lat 51.52830 /' /etc/default/readsb; fi -# sed -i -E -e "s/--lat .?[0-9]*.?[0-9]* /--lat $lat /" /etc/default/readsb -# sed -i -E -e "s/--lon .?[0-9]*.?[0-9]* /--lon $lon /" /etc/default/readsb -# systemctl restart readsb -# EOF -# chmod a+x /usr/local/bin/readsb-set-location - - -# echo -------------- -# cd "$ipath" - -# if [[ -z "$NO_TAR1090" ]] ; then -# wget -O tar1090-install.sh https://raw.githubusercontent.com/wiedehopf/tar1090/master/install.sh -# bash tar1090-install.sh /run/adsb -# fi - -# if ! systemctl show readsb | grep 'ExecMainStatus=0' -qs; then -# echo -------------- -# echo -------------- -# journalctl -u readsb | tail -n30 | tee journal.log -# echo -------------- -# echo -------------- -# if grep -qs -e 'Permission denied' journal.log; then -# echo "ERROR: readsb permission issue, please perform a reboot using this command: sudo reboot" -# echo "--------------" -# echo "After the reboot, the webinterface will be available at http://$(ip route get 1.2.3.4 | grep -m1 -o -P 'src \K[0-9,.]*')/tar1090" -# else -# echo "ERROR: readsb service didn't start." -# echo " common issues: SDR not plugged in." -# echo " the webinterface will show an error until readsb is running!" -# echo " If you can't fix the issue:" -# echo " Open a github issue or contact wiedehopf on discord (https://discord.gg/DxU4VG37JS) and post the above 30 lines of log!" -# echo -------------- -# fi -# else -# echo "Don't forget to set your location using decimal latitude and longitude:" -# echo -# if echo $PATH | grep -qs '/usr/local/bin'; then -# echo "sudo readsb-set-location 50.12344 10.23429" -# else -# echo "sudo /usr/local/bin/readsb-set-location 50.12344 10.23429" -# fi -# echo -# fi \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/readsb-set-location.sh b/stage6-air/04-aryaair/files/readsb-set-location.sh deleted file mode 100644 index 58ccb1b..0000000 --- a/stage6-air/04-aryaair/files/readsb-set-location.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -lat=$(echo $1 | tr -cd '[:digit:].-') -lon=$(echo $2 | tr -cd '[:digit:].-') - -if ! awk "BEGIN{ exit ($lat > 90) }" || ! awk "BEGIN{ exit ($lat < -90) }"; then - echo - echo "Invalid latitude: $lat" - echo "Latitude must be between -90 and 90" - echo - echo "Example format for latitude: 51.528308" - echo - echo "Usage:" - echo "readsb-set-location 51.52830 -0.38178" - echo - exit 1 -fi -if ! awk "BEGIN{ exit ($lon > 180) }" || ! awk "BEGIN{ exit ($lon < -180) }"; then - echo - echo "Invalid longitude: $lon" - echo "Longitude must be between -180 and 180" - echo - echo "Example format for latitude: -0.38178" - echo - echo "Usage:" - echo "readsb-set-location 51.52830 -0.38178" - echo - exit 1 -fi - -echo -echo "setting Latitude: $lat" -echo "setting Longitude: $lon" -echo -if ! grep -e '--lon' /etc/default/readsb &>/dev/null; then sed -i -e 's/DECODER_OPTIONS="/DECODER_OPTIONS="--lon -0.38178 /' /etc/default/readsb; fi -if ! grep -e '--lat' /etc/default/readsb &>/dev/null; then sed -i -e 's/DECODER_OPTIONS="/DECODER_OPTIONS="--lat 51.52830 /' /etc/default/readsb; fi -sed -i -E -e "s/--lat .?[0-9]*.?[0-9]* /--lat $lat /" /etc/default/readsb -sed -i -E -e "s/--lon .?[0-9]*.?[0-9]* /--lon $lon /" /etc/default/readsb - -echo "Please make sure to: sudo systemctl restart readsb" diff --git a/stage6-air/04-aryaair/files/readsb.service b/stage6-air/04-aryaair/files/readsb.service deleted file mode 100644 index 15b881c..0000000 --- a/stage6-air/04-aryaair/files/readsb.service +++ /dev/null @@ -1,25 +0,0 @@ -# AryaOS readsb.service -# readsb service for systemd - -[Unit] -Description=readsb ADS-B receiver -Documentation=https://github.com/wiedehopf/readsb -PartOf=AryaAir.service -After=AryaAir.service - -[Service] -# EnvironmentFile=/etc/default/readsb -User=readsb -RuntimeDirectory=adsb -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_readsb.sh -Type=simple -Type=simple -Restart=always -RestartSec=15 -StartLimitInterval=1 -StartLimitBurst=100 -Nice=-5 - -[Install] -WantedBy=AryaAir.service \ No newline at end of file diff --git a/stage6-air/04-aryaair/files/readsb_3.14.1621_arm64.deb b/stage6-air/04-aryaair/files/readsb_3.14.1621_arm64.deb deleted file mode 100644 index 74df3ec..0000000 Binary files a/stage6-air/04-aryaair/files/readsb_3.14.1621_arm64.deb and /dev/null differ diff --git a/stage6-air/04-aryaair/files/run_readsb.sh b/stage6-air/04-aryaair/files/run_readsb.sh deleted file mode 100755 index 3933a6b..0000000 --- a/stage6-air/04-aryaair/files/run_readsb.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# AryaOS run_readsb.sh -# -# Startup file for readsb. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a - -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" -READSB_CONFIG="/boot/readsb-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -fi - -if [ -f $READSB_CONFIG ]; then - . $READSB_CONFIG -fi - -set +a - -/usr/bin/readsb \ - $RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS \ - --write-json $ADSB_JSON --quiet \ No newline at end of file diff --git a/stage6-air/prerun.sh b/stage6-air/prerun.sh deleted file mode 100755 index 4b72ef7..0000000 --- a/stage6-air/prerun.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e -# -# Copyright 2023 Sensors & Signals LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage7-sea/00-install/00-packages b/stage7-sea/00-install/00-packages deleted file mode 100644 index c4eee87..0000000 --- a/stage7-sea/00-install/00-packages +++ /dev/null @@ -1,10 +0,0 @@ -aha -git -make -gcc -g++ -cmake -pkg-config -librtlsdr-dev -whiptail -libpq-dev \ No newline at end of file diff --git a/stage7-sea/00-install/00-run.sh b/stage7-sea/00-install/00-run.sh deleted file mode 100755 index cabd5e1..0000000 --- a/stage7-sea/00-install/00-run.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# Configures pi image for AIS-catcher install, including serial settings. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -# Boilerplate -install -v -m 644 files/AryaSea.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 755 files/enable_AryaSea.sh "${ROOTFS_DIR}/usr/local/sbin" -# FIXME: Remove Node-RED flow copy scheme: -install -v -m 644 "files/AryaSea_flows.json" "${ROOTFS_DIR}/home/node-red/.node-red" - - -# FIXME: Lost child. -# install -v -m 755 files/uart_control "${ROOTFS_DIR}/home/pi" - - -# AIS-catcher -install -v -m 644 files/AIS-catcher_0.58.0_arm64.deb "${ROOTFS_DIR}/home/pi/" -mkdir -p "${ROOTFS_DIR}/usr/share/aiscatcher" -install -v -m 644 files/aiscatcher.conf "${ROOTFS_DIR}/etc/" -install -v -m 644 files/aiscatcher.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 755 files/run_aiscatcher.sh "${ROOTFS_DIR}/usr/local/sbin/" - - -# AISCOT -install -v -m 644 files/AISCOT-config.txt "${ROOTFS_DIR}/boot/" -install -v -m 644 files/AISCOT.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 755 files/run_AISCOT.sh "${ROOTFS_DIR}/usr/local/sbin/" - - -# FIXME: Disable serial console on (some?) Pi's? -# CONFIG="${ROOTFS_DIR}/boot/config.txt" -# CMDLINE="${ROOTFS_DIR}/boot/cmdline.txt" -# sed -i $CMDLINE -e "s/console=ttyAMA0,[0-9]\+ //" -# sed -i $CMDLINE -e "s/console=serial0,[0-9]\+ //" - - -# FIXME: Apply bluetooth disable overlay on (some?) Pi's? -# is_pithree() { -# grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[8d][0-9a-fA-F]$" /proc/cpuinfo -# return $? -# } -# if is_pithree; then -# sed $CONFIG -i -e "s/^#dtoverlay=pi3-disable-bt/dtoverlay=pi3-disable-bt/" -# else -# sed $CONFIG -i -e "s/^#dtoverlay=disable-bt/dtoverlay=disable-bt/" -# fi diff --git a/stage7-sea/00-install/01-run-chroot.sh b/stage7-sea/00-install/01-run-chroot.sh deleted file mode 100755 index 8ef23eb..0000000 --- a/stage7-sea/00-install/01-run-chroot.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -# AIS-catcher -dpkg -i /home/pi/AIS-catcher_0.58.0_arm64.deb -id aiscatcher || useradd --system aiscatcher -usermod -a -G plugdev aiscatcher -usermod -a -G dialout aiscatcher -chown aiscatcher:aiscatcher -R /usr/share/aiscatcher - - -# FIXME: Lost child -systemctl disable hciuart - - -# AISCOT -id aiscot || useradd --system aiscot -python3 -m pip install --break-system-packages aiscot - - -# Disable everything -systemctl disable aiscatcher -systemctl disable AISCOT -systemctl disable AryaSea diff --git a/stage7-sea/00-install/files/AIS-catcher_0.58.0_arm64.deb b/stage7-sea/00-install/files/AIS-catcher_0.58.0_arm64.deb deleted file mode 100644 index 0f155b2..0000000 Binary files a/stage7-sea/00-install/files/AIS-catcher_0.58.0_arm64.deb and /dev/null differ diff --git a/stage7-sea/00-install/files/AISCOT-config.txt b/stage7-sea/00-install/files/AISCOT-config.txt deleted file mode 100644 index 6d54702..0000000 --- a/stage7-sea/00-install/files/AISCOT-config.txt +++ /dev/null @@ -1,18 +0,0 @@ -# AryaOS AISCOT-config.txt -# -# AISCOT Env configuration file. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FEED_URL="" diff --git a/stage7-sea/00-install/files/AISCOT.service b/stage7-sea/00-install/files/AISCOT.service deleted file mode 100644 index 04a9e48..0000000 --- a/stage7-sea/00-install/files/AISCOT.service +++ /dev/null @@ -1,37 +0,0 @@ -# AryaOS AISCOT.service -# -# AISCOT service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=AISCOT: AIS to TAK Gateway -Documentation=https://github.com/SNSTAC/AISCOT -PartOf=AryaSea.service -After=AryaSea.service - -[Service] -User=aiscot -RuntimeDirectory=AISCOT -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_AISCOT.sh -SyslogIdentifier=AISCOT -Type=simple -Restart=always -RestartSec=20 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaSea.service diff --git a/stage7-sea/00-install/files/AryaSea.service b/stage7-sea/00-install/files/AryaSea.service deleted file mode 100644 index 6da3846..0000000 --- a/stage7-sea/00-install/files/AryaSea.service +++ /dev/null @@ -1,30 +0,0 @@ -# AryaOS AryaSea.service -# -# Meta-app for AryaOS maritime SA services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=AryaSea: Meta-app for AryaOS maritime SA services. -Documentation=https://github.com/SNSTAC/AryaOS -Wants=network.target -After=network.target - -[Service] -Type=oneshot -ExecStart=/bin/true -RemainAfterExit=yes - -[Install] -WantedBy=default.target diff --git a/stage7-sea/00-install/files/AryaSea_flows.json b/stage7-sea/00-install/files/AryaSea_flows.json deleted file mode 100644 index 89986b1..0000000 --- a/stage7-sea/00-install/files/AryaSea_flows.json +++ /dev/null @@ -1,4535 +0,0 @@ -[ - { - "id": "1d5c7046712ea9d2", - "type": "tab", - "label": "Control", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "94cf869050128770", - "type": "tab", - "label": "Dashboard", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "9c4ba3cbc4bd87fa", - "type": "tab", - "label": "Maps", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "76732e91104cd622", - "type": "tab", - "label": "I/O", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "4fa67ac9ec0c7369", - "type": "tab", - "label": "Config", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "898f970d26b5049d", - "type": "tab", - "label": "TAK", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "f8d4ccf4360ea706", - "type": "tab", - "label": "Sit(x)", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "bd418afe09349324", - "type": "group", - "z": "1d5c7046712ea9d2", - "name": "DANGER ZONE", - "style": { - "fill": "#ffbfbf", - "label": true - }, - "nodes": [ - "683a2b05.736204", - "1cf31554.2aaa63", - "38e53dbf.ca594a", - "c409cae5.8e4128", - "811dc61136e8046d", - "0be2a009aadd225d" - ], - "x": 674, - "y": 551.5, - "w": 472, - "h": 217 - }, - { - "id": "c5409a5d2b5e28d5", - "type": "group", - "z": "4fa67ac9ec0c7369", - "style": { - "stroke": "#999999", - "stroke-opacity": "1", - "fill": "none", - "fill-opacity": "1", - "label": true, - "label-position": "nw", - "color": "#a4a4a4" - }, - "nodes": [ - "2d8066d127cb6c44", - "df765e01751751eb", - "bb55ecc1c7a7da19" - ], - "x": 464, - "y": 59, - "w": 302, - "h": 82 - }, - { - "id": "a247d145bc97ec4e", - "type": "group", - "z": "4fa67ac9ec0c7369", - "style": { - "stroke": "#999999", - "stroke-opacity": "1", - "fill": "none", - "fill-opacity": "1", - "label": true, - "label-position": "nw", - "color": "#a4a4a4" - }, - "nodes": [ - "cb87c8b4398c815d", - "90bbf3ddaabf55d6", - "70a02ab5c732adf0", - "8f90b1c209f39ff8", - "e435961c35c6c50f", - "a693d594320c6842" - ], - "x": 454, - "y": 159, - "w": 392, - "h": 162 - }, - { - "id": "edc83286b603d84a", - "type": "ui_tab", - "name": "AryaOS Dashboard", - "icon": "dashboard", - "order": 2, - "disabled": false, - "hidden": false - }, - { - "id": "e828481c0c713837", - "type": "ui_base", - "theme": { - "name": "theme-light", - "lightTheme": { - "default": "#0094CE", - "baseColor": "#0094CE", - "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", - "edited": true, - "reset": false - }, - "darkTheme": { - "default": "#097479", - "baseColor": "#097479", - "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", - "edited": false - }, - "customTheme": { - "name": "Untitled Theme 1", - "default": "#4B7930", - "baseColor": "#4B7930", - "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" - }, - "themeState": { - "base-color": { - "default": "#0094CE", - "value": "#0094CE", - "edited": false - }, - "page-titlebar-backgroundColor": { - "value": "#0094CE", - "edited": false - }, - "page-backgroundColor": { - "value": "#fafafa", - "edited": false - }, - "page-sidebar-backgroundColor": { - "value": "#ffffff", - "edited": false - }, - "group-textColor": { - "value": "#1bbfff", - "edited": false - }, - "group-borderColor": { - "value": "#ffffff", - "edited": false - }, - "group-backgroundColor": { - "value": "#ffffff", - "edited": false - }, - "widget-textColor": { - "value": "#111111", - "edited": false - }, - "widget-backgroundColor": { - "value": "#0094ce", - "edited": false - }, - "widget-borderColor": { - "value": "#ffffff", - "edited": false - }, - "base-font": { - "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" - } - }, - "angularTheme": { - "primary": "indigo", - "accents": "blue", - "warn": "red", - "background": "grey", - "palette": "light" - } - }, - "site": { - "name": "Node-RED Dashboard", - "hideToolbar": "false", - "allowSwipe": "false", - "lockMenu": "false", - "allowTempTheme": "true", - "dateFormat": "DD/MM/YYYY", - "sizes": { - "sx": 48, - "sy": 48, - "gx": 6, - "gy": 6, - "cx": 6, - "cy": 6, - "px": 0, - "py": 0 - } - } - }, - { - "id": "703b3b0940030133", - "type": "ui_group", - "name": "ADS-B Default Dashboard", - "tab": "edc83286b603d84a", - "order": 1, - "disp": false, - "width": "20", - "collapse": false, - "className": "" - }, - { - "id": "1890881e.83819", - "type": "ui_group", - "name": "Col 1", - "tab": "c3173234.2636e", - "order": 1, - "disp": false, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "c5f1b8aa.45bc08", - "type": "ui_group", - "name": "Actions", - "tab": "3883fa5a5cd96180", - "order": 1, - "disp": true, - "width": "12", - "collapse": false, - "className": "" - }, - { - "id": "9a96a8b1.92db78", - "type": "ui_group", - "name": "Col 2", - "tab": "c3173234.2636e", - "order": 2, - "disp": false, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "72fc319.cc425d", - "type": "ui_group", - "name": "Col 3", - "tab": "c3173234.2636e", - "order": 3, - "disp": false, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "c3173234.2636e", - "type": "ui_tab", - "name": "System Dashboard", - "icon": "dashboard", - "order": 3, - "disabled": false, - "hidden": false - }, - { - "id": "98514ac85fb371eb", - "type": "ui_tab", - "name": "Debug Dashboard", - "icon": "dashboard", - "order": 5, - "disabled": false, - "hidden": false - }, - { - "id": "985cb816630d7e12", - "type": "ui_group", - "name": "Group 1", - "tab": "98514ac85fb371eb", - "order": 1, - "disp": false, - "width": "20", - "collapse": false, - "className": "" - }, - { - "id": "1a1f481e736717f6", - "type": "ui_tab", - "name": "System Configuration", - "icon": "dashboard", - "order": 6, - "disabled": false, - "hidden": false - }, - { - "id": "ea29ae5e99fd702f", - "type": "ui_group", - "name": "ADSBCOT Config", - "tab": "1a1f481e736717f6", - "order": 2, - "disp": true, - "width": "18", - "collapse": false, - "className": "" - }, - { - "id": "c9b3e02a2ade5f4f", - "type": "ui_group", - "name": "AryaOS Config", - "tab": "1a1f481e736717f6", - "order": 1, - "disp": true, - "width": "18", - "collapse": false, - "className": "" - }, - { - "id": "d39a9c40a9e39a06", - "type": "ui_group", - "name": "DANGER ZONE", - "tab": "3883fa5a5cd96180", - "order": 3, - "disp": true, - "width": "12", - "collapse": false, - "className": "" - }, - { - "id": "4f5d2f631860ad85", - "type": "ui_group", - "name": "TAK Users", - "tab": "f26ff01359312d83", - "order": 1, - "disp": true, - "width": "12", - "collapse": false, - "className": "" - }, - { - "id": "f26ff01359312d83", - "type": "ui_tab", - "name": "TAK", - "icon": "dashboard", - "order": 7, - "disabled": false, - "hidden": false - }, - { - "id": "2ff2aec393c0b08b", - "type": "ui_link", - "name": "AryaOS Home", - "link": "http://AryaOS.local", - "icon": "open_in_browser", - "target": "newtab", - "order": 1 - }, - { - "id": "3883fa5a5cd96180", - "type": "ui_tab", - "name": "System Control", - "icon": "dashboard", - "order": 4, - "disabled": false, - "hidden": false - }, - { - "id": "2372a1b55988c40f", - "type": "ui_group", - "name": "Controls", - "tab": "3883fa5a5cd96180", - "order": 2, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "70391654394ec679", - "type": "ui_spacer", - "z": "1d5c7046712ea9d2", - "name": "spacer", - "group": "d39a9c40a9e39a06", - "order": 3, - "width": "4", - "height": "1" - }, - { - "id": "1027f32817e150a0", - "type": "ui_group", - "name": "Group 3", - "tab": "1a1f481e736717f6", - "order": 3, - "disp": false, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "6225bafcfc61cabf", - "type": "sitx_config", - "name": "AryaOS-gba@Verizon" - }, - { - "id": "683a2b05.736204", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 1, - "width": "4", - "height": "1", - "passthru": false, - "label": "Reboot", - "tooltip": "", - "color": "black", - "bgcolor": "yellow", - "className": "", - "icon": "", - "payload": "", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 760, - "y": 660, - "wires": [ - [ - "1cf31554.2aaa63" - ] - ] - }, - { - "id": "1cf31554.2aaa63", - "type": "exec", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "command": "sudo /sbin/reboot", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "Reboot", - "x": 940, - "y": 660, - "wires": [ - [], - [], - [] - ] - }, - { - "id": "38e53dbf.ca594a", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 2, - "width": "4", - "height": "1", - "passthru": false, - "label": "Shutdown", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 770, - "y": 720, - "wires": [ - [ - "c409cae5.8e4128" - ] - ] - }, - { - "id": "c409cae5.8e4128", - "type": "exec", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "command": "sudo /sbin/shutdown -h now", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "Shutdown", - "x": 950, - "y": 720, - "wires": [ - [], - [], - [] - ] - }, - { - "id": "08b06bdbca165793", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 1, - "width": "4", - "height": "1", - "passthru": false, - "label": "Restart AISCOT", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "AISCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 140, - "y": 40, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "811dc61136e8046d", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 6, - "width": "3", - "height": "1", - "passthru": false, - "label": "Reset WiFi", - "tooltip": "", - "color": "", - "bgcolor": "orange", - "className": "", - "icon": "", - "payload": "comitup", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 770, - "y": 600, - "wires": [ - [ - "0be2a009aadd225d" - ] - ] - }, - { - "id": "0be2a009aadd225d", - "type": "exec", - "z": "1d5c7046712ea9d2", - "g": "bd418afe09349324", - "command": "/usr/local/sbin/wifi-nuke.py", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 1000, - "y": 600, - "wires": [ - [ - "3493a1a21d11eab7" - ], - [ - "6949a7f7b06e7070" - ], - [ - "90ed4f84f5e592ba" - ] - ] - }, - { - "id": "f37f9b80fb0791de", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 4, - "width": "4", - "height": "1", - "passthru": false, - "label": "Restart aiscatcher", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "aiscatcher", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 110, - "y": 80, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "6fc81090ee2796ba", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 4, - "width": "3", - "height": "1", - "passthru": false, - "label": "Enable WiFi", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "comitup", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 230, - "y": 680, - "wires": [ - [ - "a903f3dcc9380af0" - ] - ] - }, - { - "id": "35db67c1c93d5f7a", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 13, - "width": "4", - "height": "1", - "passthru": false, - "label": "Restart LINCOT", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "LINCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 160, - "y": 120, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "e8fb5bb0a8855bb9", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 10, - "width": "4", - "height": "1", - "passthru": false, - "label": "Restart gpsd", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "lincot", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 150, - "y": 160, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "88eaf8eb64d89ff4", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 3, - "width": "4", - "height": "1", - "passthru": false, - "label": "Disable AISCOT", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "AISCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 200, - "y": 400, - "wires": [ - [ - "08bbb4b6c1e5af69" - ] - ] - }, - { - "id": "3493a1a21d11eab7", - "type": "ui_template", - "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "name": "Control stdout", - "order": 9, - "width": "12", - "height": "5", - "format": "
\n", - "storeOutMessages": false, - "fwdInMessages": true, - "resendOnRefresh": false, - "templateScope": "local", - "className": "", - "x": 1280, - "y": 360, - "wires": [ - [] - ] - }, - { - "id": "892008ebaff339b8", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "send systemctl cmd", - "func": "let pl = msg.payload;\nlet cmd;\nfor (cmd of msg.cmds) {\n msg.payload = `sudo /bin/systemctl ${cmd} ${pl}`\n node.send(msg);\n}\n", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 640, - "y": 420, - "wires": [ - [ - "c54c8c00ef81cc1e" - ] - ] - }, - { - "id": "08bbb4b6c1e5af69", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "msg.cmds = [\"disable\", \"stop\"]\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 420, - "y": 420, - "wires": [ - [ - "892008ebaff339b8" - ] - ] - }, - { - "id": "a903f3dcc9380af0", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "msg.cmds = [\"enable\", \"start\"]\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 460, - "y": 780, - "wires": [ - [ - "892008ebaff339b8" - ] - ] - }, - { - "id": "6949a7f7b06e7070", - "type": "ui_template", - "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "name": "Control stderr", - "order": 10, - "width": "12", - "height": "5", - "format": "
\n", - "storeOutMessages": false, - "fwdInMessages": true, - "resendOnRefresh": false, - "templateScope": "local", - "className": "", - "x": 1280, - "y": 400, - "wires": [ - [] - ] - }, - { - "id": "3e098904e91c0153", - "type": "ui_text", - "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "order": 7, - "width": "12", - "height": "1", - "name": "", - "label": "Last cmd", - "format": "\"{{msg.payload}}\"", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 1040, - "y": 300, - "wires": [] - }, - { - "id": "90ed4f84f5e592ba", - "type": "ui_text", - "z": "1d5c7046712ea9d2", - "group": "d39a9c40a9e39a06", - "order": 8, - "width": "6", - "height": "1", - "name": "", - "label": "Exit Code", - "format": "{{msg.payload.code}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 1260, - "y": 440, - "wires": [] - }, - { - "id": "c54c8c00ef81cc1e", - "type": "delay", - "z": "1d5c7046712ea9d2", - "name": "", - "pauseType": "delay", - "timeout": "4", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 840, - "y": 420, - "wires": [ - [ - "3e098904e91c0153", - "3880190e670fb806", - "89b46799e22ef74c" - ] - ] - }, - { - "id": "384961823b4116f8", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "msg.cmds = [\"restart\"]\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 480, - "y": 100, - "wires": [ - [ - "892008ebaff339b8" - ] - ] - }, - { - "id": "3f668133edf0f84f", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 2, - "width": "4", - "height": "1", - "passthru": false, - "label": "Enable AISCOT", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "AISCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 220, - "y": 760, - "wires": [ - [ - "a903f3dcc9380af0" - ] - ] - }, - { - "id": "cbbce818d3e35f27", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 6, - "width": "4", - "height": "1", - "passthru": false, - "label": "Disable aiscatcher", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "aiscatcher", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 170, - "y": 440, - "wires": [ - [ - "08bbb4b6c1e5af69" - ] - ] - }, - { - "id": "a89b330a230704e0", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 5, - "width": "4", - "height": "1", - "passthru": false, - "label": "Enable aiscatcher", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "aiscatcher", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 190, - "y": 800, - "wires": [ - [ - "a903f3dcc9380af0" - ] - ] - }, - { - "id": "ca872d53fb7f1c07", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 12, - "width": "4", - "height": "1", - "passthru": false, - "label": "Disable gpsd", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "gpsd", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 210, - "y": 480, - "wires": [ - [ - "08bbb4b6c1e5af69" - ] - ] - }, - { - "id": "a626a2fb10efab5a", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 11, - "width": "4", - "height": "1", - "passthru": false, - "label": "Enable gpsd", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "gpsd", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 230, - "y": 840, - "wires": [ - [ - "a903f3dcc9380af0" - ] - ] - }, - { - "id": "dc0e12826769d931", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 15, - "width": "4", - "height": "1", - "passthru": false, - "label": "Disable LINCOT", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "LINCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 200, - "y": 520, - "wires": [ - [ - "08bbb4b6c1e5af69" - ] - ] - }, - { - "id": "22728d91b6fa7e95", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "c5f1b8aa.45bc08", - "order": 14, - "width": "4", - "height": "1", - "passthru": false, - "label": "Enable LINCOT", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "LINCOT", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 240, - "y": 880, - "wires": [ - [ - "a903f3dcc9380af0" - ] - ] - }, - { - "id": "4507524764f2e670", - "type": "ui_button", - "z": "1d5c7046712ea9d2", - "name": "", - "group": "d39a9c40a9e39a06", - "order": 5, - "width": "3", - "height": "1", - "passthru": false, - "label": "Disable WiFi", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "", - "payloadType": "str", - "topic": "", - "topicType": "str", - "x": 210, - "y": 300, - "wires": [ - [ - "f8a415dbee252311" - ] - ] - }, - { - "id": "f8a415dbee252311", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "set cmds", - "func": "node.send({ \"payload\": \"sudo /bin/systemctl disable comitup\" })\nnode.send({ \"payload\": \"sudo /bin/systemctl stop comitup\" })\nnode.send({ \"payload\": \"/usr/local/sbin/wifi-nuke.py\" })\nnode.send({ \"payload\": \"sudo /usr/bin/nmcli device disconnect wlan0\" })\n", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 380, - "y": 300, - "wires": [ - [ - "89b46799e22ef74c", - "3e098904e91c0153" - ] - ] - }, - { - "id": "3880190e670fb806", - "type": "debug", - "z": "1d5c7046712ea9d2", - "name": "debug 6", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1040, - "y": 440, - "wires": [] - }, - { - "id": "89b46799e22ef74c", - "type": "exec", - "z": "1d5c7046712ea9d2", - "command": "", - "addpay": "payload", - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 1030, - "y": 360, - "wires": [ - [ - "3493a1a21d11eab7" - ], - [ - "6949a7f7b06e7070" - ], - [ - "90ed4f84f5e592ba", - "05b15b7858e7cbca" - ] - ] - }, - { - "id": "191a64ffb1ef6aac", - "type": "link in", - "z": "1d5c7046712ea9d2", - "name": "Control In", - "links": [ - "bb55ecc1c7a7da19" - ], - "x": 765, - "y": 260, - "wires": [ - [ - "89b46799e22ef74c", - "3e098904e91c0153" - ] - ] - }, - { - "id": "6b7e442910d1d689", - "type": "function", - "z": "1d5c7046712ea9d2", - "name": "Restart Daemons", - "func": "const daemons = [\"adsbcot\", \"lincot\"];\nlet daemon\nfor (daemon of daemons) {\n node.send({ \"payload\": daemon})\n}", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 450, - "y": 40, - "wires": [ - [ - "384961823b4116f8" - ] - ] - }, - { - "id": "af90dbace757338b", - "type": "link in", - "z": "1d5c7046712ea9d2", - "name": "Control systemctl In", - "links": [ - "7ec81fe075691fa0" - ], - "x": 325, - "y": 40, - "wires": [ - [ - "6b7e442910d1d689" - ] - ] - }, - { - "id": "05b15b7858e7cbca", - "type": "link out", - "z": "1d5c7046712ea9d2", - "name": "Exec Out", - "mode": "link", - "links": [ - "4317408c7b784c0b" - ], - "x": 1145, - "y": 200, - "wires": [] - }, - { - "id": "c82e38d047199cb5", - "type": "function", - "z": "94cf869050128770", - "name": "Current Aircraft Count", - "func": "let pl = msg.payload;\n\nlet payloads = [\n { \"payload\": msg.payload.aircraft.length },\n { \"payload\": msg.payload.messages }\n]\n\nreturn payloads;", - "outputs": 2, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 300, - "y": 100, - "wires": [ - [], - [] - ] - }, - { - "id": "2653a0b0.26d638", - "type": "ui_gauge", - "z": "94cf869050128770", - "name": "", - "group": "1890881e.83819", - "order": 2, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "CPU Temperature", - "label": "C", - "format": "{{value}}", - "min": 0, - "max": "100", - "colors": [ - "#00b500", - "#e6e600", - "#ca3838" - ], - "x": 710, - "y": 600, - "wires": [] - }, - { - "id": "fba68adf.14e13", - "type": "exec", - "z": "94cf869050128770", - "command": "vcgencmd measure_temp", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "name": "RPi Temp.", - "x": 330, - "y": 620, - "wires": [ - [ - "fa5b499.e176cb8" - ], - [], - [] - ] - }, - { - "id": "7c8379de.068868", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [ - { - "p": "payload", - "v": "", - "vt": "date" - }, - { - "p": "topic", - "v": "", - "vt": "str" - } - ], - "repeat": "10", - "crontab": "", - "once": false, - "topic": "", - "payload": "", - "payloadType": "date", - "x": 124.5, - "y": 648.25, - "wires": [ - [ - "fba68adf.14e13", - "972ece2a.3dbe8", - "6242be99.26ac88" - ] - ] - }, - { - "id": "fa5b499.e176cb8", - "type": "function", - "z": "94cf869050128770", - "name": "", - "func": "str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 500, - "y": 600, - "wires": [ - [ - "2653a0b0.26d638", - "28b64a2c.b32116" - ] - ] - }, - { - "id": "28b64a2c.b32116", - "type": "ui_chart", - "z": "94cf869050128770", - "name": "CPU Temperature", - "group": "1890881e.83819", - "order": 3, - "width": 0, - "height": 0, - "label": "CPU Temperature", - "chartType": "line", - "legend": "false", - "xformat": "HH:mm:ss", - "interpolate": "linear", - "nodata": "", - "dot": false, - "ymin": "", - "ymax": "", - "removeOlder": "24", - "removeOlderPoints": "", - "removeOlderUnit": "3600", - "cutout": 0, - "useOneColor": false, - "useUTC": false, - "colors": [ - "#1f77b4", - "#aec7e8", - "#ff7f0e", - "#2ca02c", - "#98df8a", - "#d62728", - "#ff9896", - "#9467bd", - "#c5b0d5" - ], - "outputs": 1, - "useDifferentColor": false, - "className": "", - "x": 710, - "y": 640, - "wires": [ - [] - ] - }, - { - "id": "972ece2a.3dbe8", - "type": "exec", - "z": "94cf869050128770", - "command": "top -d 0.5 -b -n2 | grep \"Cpu(s)\"| awk '{print $2 + $4}'", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "CPU Load", - "x": 330, - "y": 680, - "wires": [ - [ - "a5da1eb0f58fe89a" - ], - [], - [] - ] - }, - { - "id": "6242be99.26ac88", - "type": "exec", - "z": "94cf869050128770", - "command": "free | grep Mem | awk '{print 100*($3+$5+$6)/$2}'", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "Free Memory", - "x": 330, - "y": 740, - "wires": [ - [ - "77573ff2f632057f" - ], - [], - [] - ] - }, - { - "id": "b9372186.ed1a5", - "type": "ui_gauge", - "z": "94cf869050128770", - "name": "", - "group": "1890881e.83819", - "order": 1, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Processor", - "label": "CPU", - "format": "{{value}}", - "min": 0, - "max": "100", - "colors": [ - "#00b500", - "#e6e600", - "#ca3838" - ], - "x": 680, - "y": 680, - "wires": [] - }, - { - "id": "9b301b09.8c0468", - "type": "ui_gauge", - "z": "94cf869050128770", - "name": "Memory", - "group": "9a96a8b1.92db78", - "order": 1, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Memory", - "label": "RAM", - "format": "{{value}}", - "min": 0, - "max": "100", - "colors": [ - "#00b500", - "#e6e600", - "#ca3838" - ], - "seg1": "", - "seg2": "", - "diff": false, - "className": "", - "x": 640, - "y": 740, - "wires": [] - }, - { - "id": "270f61f0.9af05e", - "type": "exec", - "z": "94cf869050128770", - "command": "df -h", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "name": "Disk Usage", - "x": 330, - "y": 880, - "wires": [ - [ - "d70b7556.a0a9e" - ], - [], - [] - ] - }, - { - "id": "7ca6ecb.7512014", - "type": "ui_gauge", - "z": "94cf869050128770", - "name": "", - "group": "72fc319.cc425d", - "order": 1, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Disk", - "label": "Usage", - "format": "{{value}}", - "min": 0, - "max": "100", - "colors": [ - "#00b500", - "#e6e600", - "#ca3838" - ], - "x": 650, - "y": 880, - "wires": [] - }, - { - "id": "d70b7556.a0a9e", - "type": "function", - "z": "94cf869050128770", - "name": "", - "func": "var re = /([0-9]{2})%/\nvar idx = msg.payload.search(re);\nvar str = msg.payload;\nif (idx >=0) {\n str = msg.payload.substring(idx, idx + 2);\n}\nmsg.payload = str;\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 510, - "y": 880, - "wires": [ - [ - "7ca6ecb.7512014" - ] - ] - }, - { - "id": "59103f97.07fed", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "repeat": "60", - "crontab": "", - "once": false, - "topic": "", - "payload": "", - "payloadType": "date", - "x": 130, - "y": 880, - "wires": [ - [ - "270f61f0.9af05e" - ] - ] - }, - { - "id": "77573ff2f632057f", - "type": "function", - "z": "94cf869050128770", - "name": "function 1", - "func": "msg.payload = parseFloat(msg.payload).toFixed(1)\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 500, - "y": 740, - "wires": [ - [ - "9b301b09.8c0468" - ] - ] - }, - { - "id": "a5da1eb0f58fe89a", - "type": "function", - "z": "94cf869050128770", - "name": "Average CPUs", - "func": "const pl = msg.payload;\n\nconst loads = pl.split(\"\\n\").filter(n => n)\n\nvar total = 0;\nfor (var i = 0; i < loads.length; i++) {\n total += loads[i];\n}\nvar avg = total / loads.length;\n\n\nmsg.payload = loads;\n\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 520, - "y": 680, - "wires": [ - [ - "b9372186.ed1a5" - ] - ] - }, - { - "id": "20787a00729ffe5f", - "type": "link in", - "z": "94cf869050128770", - "name": "Dashboard In", - "links": [ - "64fa2c00f63bdd53" - ], - "x": 155, - "y": 100, - "wires": [ - [ - "c82e38d047199cb5" - ] - ] - }, - { - "id": "c1b4f4996f5aa122", - "type": "comment", - "z": "94cf869050128770", - "name": "ADS-B Dashboard", - "info": "", - "x": 110, - "y": 40, - "wires": [] - }, - { - "id": "43b182ea252f059a", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "300", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 110, - "y": 500, - "wires": [ - [ - "a8c763426a388421" - ] - ] - }, - { - "id": "a8c763426a388421", - "type": "exec", - "z": "94cf869050128770", - "command": "gpsctl", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "gpsctl", - "x": 290, - "y": 500, - "wires": [ - [ - "6ffc305ab7e20ec7" - ], - [], - [] - ] - }, - { - "id": "6ffc305ab7e20ec7", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 2, - "width": 15, - "height": 1, - "name": "GPSCTL", - "label": "GPS Device:", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 460, - "y": 480, - "wires": [] - }, - { - "id": "73eb77cde2c7a709", - "type": "exec", - "z": "94cf869050128770", - "command": "gpspipe --json -n 5|grep TPV|tail -1", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "gpspipe", - "x": 300, - "y": 420, - "wires": [ - [ - "de2c209dbe934060" - ], - [], - [] - ] - }, - { - "id": "69bd079907c39f3c", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "30", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 110, - "y": 420, - "wires": [ - [ - "73eb77cde2c7a709" - ] - ] - }, - { - "id": "de2c209dbe934060", - "type": "json", - "z": "94cf869050128770", - "name": "", - "property": "payload", - "action": "", - "pretty": false, - "x": 430, - "y": 400, - "wires": [ - [ - "1190f05a50aad89c" - ] - ] - }, - { - "id": "1190f05a50aad89c", - "type": "function", - "z": "94cf869050128770", - "name": "GPS Mode Lookup", - "func": "// https://gpsd.gitlab.io/gpsd/gpsd_json.html\n\nconst pl = msg.payload;\n\nmsg.payload = \"Invalid Mode\";\n\nswitch (parseInt(pl.mode)) { \n case 0:\n msg.payload = \"UNKNOWN\";\n break;\n case 1:\n msg.payload = \"NO FIX\";\n break;\n case 2:\n msg.payload = \"2D\";\n break;\n case 3:\n msg.payload = \"3D\";\n break;\n default:\n msg.payload = \"Invalid Mode\";\n break;\n}\n\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 610, - "y": 400, - "wires": [ - [ - "43958e20b7e848a3" - ] - ] - }, - { - "id": "5dd1990becedf2b0", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "300", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 110, - "y": 1220, - "wires": [ - [ - "b1397733b1721b33" - ] - ] - }, - { - "id": "b1397733b1721b33", - "type": "exec", - "z": "94cf869050128770", - "command": "lsusb|sort", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 300, - "y": 1220, - "wires": [ - [ - "3261a8dfedfae96d" - ], - [], - [] - ] - }, - { - "id": "3261a8dfedfae96d", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "", - "order": 11, - "width": 20, - "height": 4, - "format": "USB Devices\n\n
", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 460, - "y": 1200, - "wires": [ - [] - ] - }, - { - "id": "ca3080fa414c682a", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "300", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 110, - "y": 1280, - "wires": [ - [ - "b8c830dc7384cd97" - ] - ] - }, - { - "id": "b8c830dc7384cd97", - "type": "exec", - "z": "94cf869050128770", - "command": "dmesg|egrep -vi '(^$)'|tail -10", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 360, - "y": 1280, - "wires": [ - [ - "a37cfd5ee5320ebf" - ], - [], - [] - ] - }, - { - "id": "a37cfd5ee5320ebf", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "dmesg Tail", - "order": 12, - "width": 20, - "height": 6, - "format": "dmesg Tail\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 610, - "y": 1260, - "wires": [ - [] - ] - }, - { - "id": "43958e20b7e848a3", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 3, - "width": 15, - "height": 1, - "name": "GPS Fix?", - "label": "GPS Mode/Fix:", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 780, - "y": 400, - "wires": [] - }, - { - "id": "67c1aa629a2e95af", - "type": "exec", - "z": "94cf869050128770", - "command": "/usr/local/sbin/get_throttled.sh", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 350, - "y": 1420, - "wires": [ - [ - "4f64ec7db13ee424" - ], - [], - [] - ] - }, - { - "id": "4f64ec7db13ee424", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "Throttle Status", - "order": 10, - "width": 20, - "height": 3, - "format": "Throttle Status\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 580, - "y": 1400, - "wires": [ - [] - ] - }, - { - "id": "4338acd2934924cc", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "300", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 130, - "y": 1420, - "wires": [ - [ - "67c1aa629a2e95af" - ] - ] - }, - { - "id": "16419a36256c9583", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "60", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "x": 150, - "y": 1080, - "wires": [ - [ - "b1d1259dd556c68a" - ] - ] - }, - { - "id": "b1d1259dd556c68a", - "type": "exec", - "z": "94cf869050128770", - "command": "uptime", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 270, - "y": 1080, - "wires": [ - [ - "267687b40c52261e" - ], - [], - [] - ] - }, - { - "id": "267687b40c52261e", - "type": "ui_text", - "z": "94cf869050128770", - "group": "703b3b0940030133", - "order": 3, - "width": 15, - "height": 1, - "name": "", - "label": "Uptime: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 420, - "y": 1080, - "wires": [] - }, - { - "id": "cdbd946522287334", - "type": "ui_template", - "z": "94cf869050128770", - "group": "4f5d2f631860ad85", - "name": "AryaOS Home", - "order": 1, - "width": 0, - "height": 0, - "format": "", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 200, - "y": 220, - "wires": [ - [] - ] - }, - { - "id": "4dfeafb5656bdb04", - "type": "template", - "z": "94cf869050128770", - "name": "Services", - "field": "payload", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "[\n \"AISCOT\",\n \"aiscatcher\",\n \"comitup\",\n \"LINCOT\",\n \"nodered\",\n \"gpsd\"\n]", - "output": "str", - "x": 240, - "y": 1960, - "wires": [ - [ - "b4b0c83c63e4b4ff" - ] - ] - }, - { - "id": "285ece519bd3976f", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "20", - "crontab": "", - "once": true, - "onceDelay": "", - "topic": "", - "x": 110, - "y": 1960, - "wires": [ - [ - "4dfeafb5656bdb04" - ] - ] - }, - { - "id": "e93dc524c636e92d", - "type": "split", - "z": "94cf869050128770", - "name": "", - "splt": "\\n", - "spltType": "str", - "arraySplt": 1, - "arraySpltType": "len", - "stream": false, - "addname": "", - "x": 490, - "y": 1960, - "wires": [ - [ - "88070f84d9e74504" - ] - ] - }, - { - "id": "b4b0c83c63e4b4ff", - "type": "json", - "z": "94cf869050128770", - "name": "", - "property": "payload", - "action": "", - "pretty": false, - "x": 370, - "y": 1960, - "wires": [ - [ - "e93dc524c636e92d" - ] - ] - }, - { - "id": "88070f84d9e74504", - "type": "change", - "z": "94cf869050128770", - "name": "Set service", - "rules": [ - { - "t": "set", - "p": "service", - "pt": "msg", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 630, - "y": 1960, - "wires": [ - [ - "668b9fe6695a20aa" - ] - ] - }, - { - "id": "668b9fe6695a20aa", - "type": "exec", - "z": "94cf869050128770", - "command": "systemctl status", - "addpay": "payload", - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 120, - "y": 2080, - "wires": [ - [ - "4f78a58561400bb1" - ], - [], - [ - "37f21d650f5fda44" - ] - ] - }, - { - "id": "fb5bade2bfe9eabc", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "comitup Status", - "order": 13, - "width": 20, - "height": 5, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 700, - "y": 2020, - "wires": [ - [] - ] - }, - { - "id": "8fb99c80179472f1", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 4, - "width": 0, - "height": 0, - "name": "", - "label": "comitup State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 720, - "y": 2340, - "wires": [] - }, - { - "id": "37f21d650f5fda44", - "type": "function", - "z": "94cf869050128770", - "name": "Set HTML Payload", - "func": "const pl = msg.payload;\nconst code = pl.code;\n\nswitch (code) {\n case 0:\n msg.payload = `OK: ${code}`;\n msg.icon = \"fa-check\"\n msg.color = \"green\"\n break;\n default:\n msg.payload = `NOT OK: ${code}`\n msg.icon = \"fa-times-circle\"\n msg.color = \"red\"\n break;\n}\n\nmsg.payload = `${msg.payload}`\n\nreturn msg;\n", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 310, - "y": 2160, - "wires": [ - [ - "07a741936395d2ef" - ] - ] - }, - { - "id": "4f78a58561400bb1", - "type": "switch", - "z": "94cf869050128770", - "name": "", - "property": "service", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "comitup", - "vt": "str" - }, - { - "t": "eq", - "v": "AISCOT", - "vt": "str" - }, - { - "t": "eq", - "v": "aiscatcher", - "vt": "str" - }, - { - "t": "eq", - "v": "dump978-fa", - "vt": "str" - }, - { - "t": "eq", - "v": "nodered", - "vt": "str" - }, - { - "t": "eq", - "v": "LINCOT", - "vt": "str" - }, - { - "t": "eq", - "v": "gpsd", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 7, - "x": 490, - "y": 2060, - "wires": [ - [ - "fb5bade2bfe9eabc" - ], - [ - "cbdfeead972e8093" - ], - [ - "b885c5ed4275cf9d" - ], - [], - [ - "cc9530f61b75f0a5" - ], - [ - "ef95bf31be708221" - ], - [ - "281c50f4b51a5007" - ] - ] - }, - { - "id": "07a741936395d2ef", - "type": "switch", - "z": "94cf869050128770", - "name": "", - "property": "service", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "comitup", - "vt": "str" - }, - { - "t": "eq", - "v": "AISCOT", - "vt": "str" - }, - { - "t": "eq", - "v": "aiscatcher", - "vt": "str" - }, - { - "t": "eq", - "v": "dump978-fa", - "vt": "str" - }, - { - "t": "eq", - "v": "nodered", - "vt": "str" - }, - { - "t": "eq", - "v": "LINCOT", - "vt": "str" - }, - { - "t": "eq", - "v": "gpsd", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 7, - "x": 510, - "y": 2440, - "wires": [ - [ - "8fb99c80179472f1" - ], - [ - "385cbd3192ee530c" - ], - [ - "5775a3037267290d" - ], - [], - [ - "61e60948ad456327" - ], - [ - "95220eabc9aa718f" - ], - [ - "bad2ad8d9170ec43" - ] - ] - }, - { - "id": "cbdfeead972e8093", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "AISCOT Status", - "order": 14, - "width": 20, - "height": 5, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 700, - "y": 2060, - "wires": [ - [] - ] - }, - { - "id": "385cbd3192ee530c", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 5, - "width": 0, - "height": 0, - "name": "", - "label": "AISCOT State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 720, - "y": 2380, - "wires": [] - }, - { - "id": "5775a3037267290d", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 6, - "width": 0, - "height": 0, - "name": "", - "label": "aiscatcher State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 730, - "y": 2420, - "wires": [] - }, - { - "id": "61e60948ad456327", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 7, - "width": 0, - "height": 0, - "name": "", - "label": "Node-RED State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 730, - "y": 2460, - "wires": [] - }, - { - "id": "b885c5ed4275cf9d", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "aiscatcher Status", - "order": 15, - "width": 20, - "height": 5, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 710, - "y": 2100, - "wires": [ - [] - ] - }, - { - "id": "cc9530f61b75f0a5", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "Node-RED Status", - "order": 16, - "width": 20, - "height": 5, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 710, - "y": 2140, - "wires": [ - [] - ] - }, - { - "id": "ef95bf31be708221", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "LINCOT Status", - "order": 17, - "width": 20, - "height": 5, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 700, - "y": 2180, - "wires": [ - [] - ] - }, - { - "id": "95220eabc9aa718f", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 8, - "width": 0, - "height": 0, - "name": "", - "label": "LINCOT State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 720, - "y": 2500, - "wires": [] - }, - { - "id": "281c50f4b51a5007", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "gpsd Status", - "order": 18, - "width": 20, - "height": 4, - "format": "
Status
\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 690, - "y": 2220, - "wires": [ - [] - ] - }, - { - "id": "bad2ad8d9170ec43", - "type": "ui_text", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "order": 9, - "width": 0, - "height": 0, - "name": "", - "label": "gpsd State: ", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 710, - "y": 2540, - "wires": [] - }, - { - "id": "4317408c7b784c0b", - "type": "link in", - "z": "94cf869050128770", - "name": "Dashboard Status In", - "links": [ - "05b15b7858e7cbca" - ], - "x": 95, - "y": 1900, - "wires": [ - [ - "4dfeafb5656bdb04" - ] - ] - }, - { - "id": "eba6db50839b1dd3", - "type": "inject", - "z": "94cf869050128770", - "name": "", - "props": [], - "repeat": "30", - "crontab": "", - "once": true, - "onceDelay": "0.5", - "topic": "", - "x": 130, - "y": 1560, - "wires": [ - [ - "fe13b1777995e549" - ] - ] - }, - { - "id": "fe13b1777995e549", - "type": "exec", - "z": "94cf869050128770", - "command": "ip -json addr", - "addpay": false, - "append": "", - "useSpawn": "", - "timer": "", - "winHide": false, - "name": "", - "x": 310, - "y": 1560, - "wires": [ - [ - "a8c5db14c632752a" - ], - [], - [] - ] - }, - { - "id": "a8c5db14c632752a", - "type": "json", - "z": "94cf869050128770", - "name": "", - "property": "payload", - "action": "", - "pretty": false, - "x": 450, - "y": 1560, - "wires": [ - [ - "96eaefd7b076e52f" - ] - ] - }, - { - "id": "2273e07e235feb5f", - "type": "ui_template", - "z": "94cf869050128770", - "group": "985cb816630d7e12", - "name": "IP Interfaces", - "order": 1, - "width": 5, - "height": 2, - "format": "IP Interfaces\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 730, - "y": 1560, - "wires": [ - [] - ] - }, - { - "id": "96eaefd7b076e52f", - "type": "function", - "z": "94cf869050128770", - "name": "Format", - "func": "const pl = msg.payload\n\nconst lo0 = pl[0]\nconst eth0 = pl[1]\nconst wlan0 = pl[2]\n\nif (eth0.addr_info.length > 0) {\n eth0.ip = eth0.addr_info[0].local || \"[NO IP]\"\n}\n\nif (wlan0.addr_info.length > 0) {\n wlan0.ip = wlan0.addr_info[0].local || \"[NO IP]\"\n}\n\nmsg.payload = `${eth0.ifname}: ${eth0.ip}\\n\n${wlan0.ifname}: ${wlan0.ip}`;\n\nreturn msg;\n\n", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 580, - "y": 1560, - "wires": [ - [ - "2273e07e235feb5f", - "08b0c289b467c651" - ] - ] - }, - { - "id": "08b0c289b467c651", - "type": "ui_template", - "z": "94cf869050128770", - "group": "703b3b0940030133", - "name": "IP Interfaces", - "order": 1, - "width": 5, - "height": 3, - "format": "IP Interfaces\n
\n", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 730, - "y": 1600, - "wires": [ - [] - ] - }, - { - "id": "9f8119755cf73778", - "type": "qrcode-generator", - "z": "94cf869050128770", - "name": "", - "qrtype": "wifi2qr", - "text2qrText": "", - "ssid": "", - "hiddenssid": false, - "wifitype": "", - "phonenum": "", - "smsphonenum": "", - "smstext": "", - "mailto": "", - "mailsubject": "", - "mailbody": "", - "latitude": "", - "longitude": "", - "colorlight": "#ffffff", - "colordark": "#000000", - "printstatus": true, - "x": 570, - "y": 2820, - "wires": [ - [ - "0c52692703de2835", - "cbbe264f84b53680" - ] - ] - }, - { - "id": "a1642742e713d559", - "type": "link in", - "z": "94cf869050128770", - "name": "QR Code In", - "links": [ - "b104d679e8967f58" - ], - "x": 225, - "y": 2800, - "wires": [ - [ - "8a9319936729c649" - ] - ] - }, - { - "id": "8a9319936729c649", - "type": "function", - "z": "94cf869050128770", - "name": "Set URL", - "func": "const pl = msg.payload\nlet nodeId = pl.match(/NODE_ID=(?[^\\n\\r]+)/).groups.nodeId\nlet ssid = `AryaOS-${nodeId.substr(-4, 4)}`\n\nlet wifiUrl = `WIFI:S:${ssid};T:;P:;H:false;`\nmsg.qrcodeinput = wifiUrl\n\nreturn msg;\n", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 340, - "y": 2800, - "wires": [ - [ - "ec5307281fcd72cc", - "9f8119755cf73778" - ] - ] - }, - { - "id": "ec5307281fcd72cc", - "type": "debug", - "z": "94cf869050128770", - "name": "debug 10", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 480, - "y": 2780, - "wires": [] - }, - { - "id": "0c52692703de2835", - "type": "debug", - "z": "94cf869050128770", - "name": "debug 11", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 660, - "y": 2880, - "wires": [] - }, - { - "id": "cbbe264f84b53680", - "type": "ui_template", - "z": "94cf869050128770", - "group": "703b3b0940030133", - "name": "QR Code", - "order": 6, - "width": 5, - "height": 4, - "format": "
Join AryaOS WiFi:
", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 580, - "y": 2980, - "wires": [ - [] - ] - }, - { - "id": "605314ea7983779d", - "type": "worldmap", - "z": "9c4ba3cbc4bd87fa", - "name": "AryaOS Map", - "lat": "37.16611", - "lon": "-119.44944", - "zoom": "6", - "layer": "Custom", - "cluster": "", - "maxage": "", - "usermenu": "show", - "layers": "show", - "panit": "false", - "panlock": "false", - "zoomlock": "false", - "hiderightclick": "false", - "coords": "deg", - "showgrid": "true", - "showruler": "false", - "allowFileDrop": "false", - "path": "/AryaOS-map", - "overlist": "DR,CO,RA,DN,BU,RW,SN,AC,TL,HM", - "maplist": "OSMG,OSMC,OSMH,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,HB,AN,ST,SW", - "mapname": "CalFire Airbases", - "mapurl": "http://AryaOS.local/calfire_airbases/{z}/{x}/{y}.png", - "mapopt": "", - "mapwms": true, - "x": 550, - "y": 120, - "wires": [] - }, - { - "id": "828d600baacf7776", - "type": "tak2wm", - "z": "9c4ba3cbc4bd87fa", - "name": "TAK2Worldmap", - "x": 360, - "y": 120, - "wires": [ - [ - "605314ea7983779d" - ] - ] - }, - { - "id": "3ffffc180cc204dd", - "type": "link in", - "z": "9c4ba3cbc4bd87fa", - "name": "Maps In", - "links": [ - "089a5c1ffeafe91b" - ], - "x": 185, - "y": 120, - "wires": [ - [ - "828d600baacf7776" - ] - ] - }, - { - "id": "5f6eab2d3d6ad9be", - "type": "json", - "z": "76732e91104cd622", - "name": "", - "property": "payload", - "action": "", - "pretty": false, - "x": 510, - "y": 60, - "wires": [ - [ - "64fa2c00f63bdd53" - ] - ] - }, - { - "id": "64fa2c00f63bdd53", - "type": "link out", - "z": "76732e91104cd622", - "name": "aircraft Out", - "mode": "link", - "links": [ - "20787a00729ffe5f", - "2934adb02aeb8158" - ], - "x": 595, - "y": 60, - "wires": [] - }, - { - "id": "b068a436f07cc0bd", - "type": "watch", - "z": "76732e91104cd622", - "name": "", - "files": "/run/adsb/aircraft.json", - "recursive": "", - "x": 170, - "y": 60, - "wires": [ - [ - "99dfc7e97f5f8d47" - ] - ] - }, - { - "id": "99dfc7e97f5f8d47", - "type": "file in", - "z": "76732e91104cd622", - "name": "", - "filename": "payload", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 380, - "y": 60, - "wires": [ - [ - "5f6eab2d3d6ad9be" - ] - ] - }, - { - "id": "ba3910d8c8793f4d", - "type": "watch", - "z": "76732e91104cd622", - "name": "", - "files": "/boot/ADSBCOT-config.txt", - "recursive": "", - "x": 150, - "y": 160, - "wires": [ - [ - "4e74c03efbd3034e", - "7ec81fe075691fa0" - ] - ] - }, - { - "id": "99875f9d26d1f50e", - "type": "link out", - "z": "76732e91104cd622", - "name": "ADSBCOT-config.txt Out", - "mode": "link", - "links": [ - "09f4ad56eb3fd133" - ], - "x": 445, - "y": 140, - "wires": [] - }, - { - "id": "5f868835544d4788", - "type": "inject", - "z": "76732e91104cd622", - "name": "/boot/AISCOT-config.txt", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "payload": "/boot/AISCOT-config.txt", - "payloadType": "str", - "x": 140, - "y": 120, - "wires": [ - [ - "4e74c03efbd3034e" - ] - ] - }, - { - "id": "1948aec0539f51d7", - "type": "watch", - "z": "76732e91104cd622", - "name": "", - "files": "/boot/AryaOS-config.txt", - "recursive": "", - "x": 140, - "y": 260, - "wires": [ - [ - "11af02e57d6dc86d", - "7ec81fe075691fa0" - ] - ] - }, - { - "id": "11af02e57d6dc86d", - "type": "file in", - "z": "76732e91104cd622", - "name": "", - "filename": "payload", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 340, - "y": 260, - "wires": [ - [ - "b104d679e8967f58" - ] - ] - }, - { - "id": "b104d679e8967f58", - "type": "link out", - "z": "76732e91104cd622", - "name": "AryaOS-config.txt Out", - "mode": "link", - "links": [ - "a1642742e713d559", - "09f4ad56eb3fd133" - ], - "x": 445, - "y": 240, - "wires": [] - }, - { - "id": "1bbbc97101f3d953", - "type": "inject", - "z": "76732e91104cd622", - "name": "", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "payload": "/boot/AryaOS-config.txt", - "payloadType": "str", - "x": 140, - "y": 220, - "wires": [ - [ - "11af02e57d6dc86d" - ] - ] - }, - { - "id": "4aa3f8001760c96a", - "type": "udp in", - "z": "76732e91104cd622", - "name": "", - "iface": "", - "port": "6969", - "ipv": "udp4", - "multicast": "true", - "group": "239.2.3.1", - "datatype": "buffer", - "x": 130, - "y": 380, - "wires": [ - [ - "089a5c1ffeafe91b" - ] - ] - }, - { - "id": "e0a7e9ef71a6f0e8", - "type": "udp in", - "z": "76732e91104cd622", - "name": "", - "iface": "wlan0", - "port": "6969", - "ipv": "udp4", - "multicast": "true", - "group": "239.2.3.1", - "datatype": "buffer", - "x": 130, - "y": 440, - "wires": [ - [ - "089a5c1ffeafe91b" - ] - ] - }, - { - "id": "bd6f79df66f3f373", - "type": "udp in", - "z": "76732e91104cd622", - "name": "", - "iface": "eth0", - "port": "6969", - "ipv": "udp4", - "multicast": "true", - "group": "239.2.3.1", - "datatype": "buffer", - "x": 130, - "y": 500, - "wires": [ - [ - "089a5c1ffeafe91b" - ] - ] - }, - { - "id": "089a5c1ffeafe91b", - "type": "link out", - "z": "76732e91104cd622", - "name": "Network TAK In", - "mode": "link", - "links": [ - "7c699e7f158dc0d5", - "3ffffc180cc204dd", - "dc87e7e88303ec78" - ], - "x": 325, - "y": 440, - "wires": [] - }, - { - "id": "662e281141324f13", - "type": "watch", - "z": "76732e91104cd622", - "name": "", - "files": "tmpConf", - "recursive": "", - "x": 100, - "y": 620, - "wires": [ - [ - "18674460572a0475" - ] - ] - }, - { - "id": "8ef58d62e7fd687c", - "type": "link out", - "z": "76732e91104cd622", - "name": "tmp-XXXX-config.txt Out", - "mode": "link", - "links": [ - "df765e01751751eb" - ], - "x": 515, - "y": 620, - "wires": [] - }, - { - "id": "1aa83bf16aa07349", - "type": "file in", - "z": "76732e91104cd622", - "name": "", - "filename": "confPath", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 420, - "y": 620, - "wires": [ - [ - "8ef58d62e7fd687c" - ] - ] - }, - { - "id": "4e74c03efbd3034e", - "type": "file in", - "z": "76732e91104cd622", - "name": "", - "filename": "payload", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 340, - "y": 140, - "wires": [ - [ - "99875f9d26d1f50e" - ] - ] - }, - { - "id": "18674460572a0475", - "type": "function", - "z": "76732e91104cd622", - "name": "Set Config Path", - "func": "msg.confPath = `/home/node-red/${msg.payload}`;\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 260, - "y": 620, - "wires": [ - [ - "1aa83bf16aa07349" - ] - ] - }, - { - "id": "7ec81fe075691fa0", - "type": "link out", - "z": "76732e91104cd622", - "name": "Configs Out", - "mode": "link", - "links": [ - "af90dbace757338b" - ], - "x": 315, - "y": 200, - "wires": [] - }, - { - "id": "58edafa9ab997436", - "type": "link in", - "z": "76732e91104cd622", - "name": "Out to Mesh SA", - "links": [ - "ddb201c5df845268" - ], - "x": 75, - "y": 840, - "wires": [ - [ - "a5dbb71f6d17579d" - ] - ] - }, - { - "id": "a5dbb71f6d17579d", - "type": "udp out", - "z": "76732e91104cd622", - "name": "", - "addr": "239.2.3.1", - "iface": "", - "port": "6969", - "ipv": "udp4", - "outport": "", - "base64": false, - "multicast": "multi", - "x": 210, - "y": 840, - "wires": [] - }, - { - "id": "20bb4cfcf85404b9", - "type": "function", - "z": "4fa67ac9ec0c7369", - "name": "Read Conf K/V", - "func": "const EOL = \"\\n\"; // FIXME: Should be os.EOL.\nconst pl = msg.payload;\nconst readEnvVars = () => pl.split(EOL);\n\nlet configs = flow.get(\"configs\") || {};\nlet config = configs[msg.filename]\n\n/**\n * Finds the key in conf files and returns the corresponding value\n *\n * @param {string} key Key to find\n * @returns {string|null} Value of the key\n */\nconst getConfValue = (key) => {\n // find the line that contains the key (exact match)\n const matchedLine = readEnvVars().find((/** @type {string} */ line) => line.split(\"=\")[0] === key);\n\n // split the line (delimiter is '=') and return the item at index 2\n return matchedLine !== undefined ? matchedLine.split(\"=\")[1] : null;\n};\n\n\nlet k;\n\nfor (k of Object.keys(config)) {\n let confVal = getConfValue(k)\n if (confVal) {\n config[k] = confVal\n }\n}\n\nconfigs[msg.filename] = config\nflow.set(\"configs\", configs)\n\nmsg.payload = config;\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 260, - "y": 360, - "wires": [ - [ - "7790857cd1c02015" - ] - ] - }, - { - "id": "7790857cd1c02015", - "type": "split", - "z": "4fa67ac9ec0c7369", - "name": "", - "splt": "\\n", - "spltType": "str", - "arraySplt": 1, - "arraySpltType": "len", - "stream": false, - "addname": "", - "x": 230, - "y": 400, - "wires": [ - [ - "b87a918bdc4910dc" - ] - ] - }, - { - "id": "b29ad47e816eeb8a", - "type": "switch", - "z": "4fa67ac9ec0c7369", - "name": "", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "NODE_ID", - "vt": "str" - }, - { - "t": "eq", - "v": "FEED_URL", - "vt": "str" - }, - { - "t": "eq", - "v": "ALT_UPPER", - "vt": "str" - }, - { - "t": "eq", - "v": "ALT_LOWER", - "vt": "str" - }, - { - "t": "eq", - "v": "COT_URL", - "vt": "str" - }, - { - "t": "eq", - "v": "PYTAK_MULTICAST_LOCAL_ADDR", - "vt": "str" - }, - { - "t": "eq", - "v": "PYTAK_TLS_CLIENT_CERT", - "vt": "str" - }, - { - "t": "eq", - "v": "STATIC_ALT", - "vt": "str" - }, - { - "t": "eq", - "v": "STATIC_LAT", - "vt": "str" - }, - { - "t": "eq", - "v": "STATIC_LON", - "vt": "str" - }, - { - "t": "eq", - "v": "COT_ACCESS", - "vt": "str" - }, - { - "t": "else" - } - ], - "checkall": "true", - "repair": false, - "outputs": 12, - "x": 410, - "y": 580, - "wires": [ - [ - "2f521601ceea7ce4" - ], - [], - [], - [], - [ - "09fb1bd40272d0af" - ], - [ - "2f25f0b243e59af1" - ], - [ - "436315b0476f70b0" - ], - [ - "5ad11569a70069c4" - ], - [ - "7b2591633f69cff2" - ], - [ - "f1a4b452b8ad0ff2" - ], - [ - "7e3b2c1fde544a53" - ], - [] - ] - }, - { - "id": "09fb1bd40272d0af", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "COT_URL", - "tooltip": "Where are we sending Cursor on Target?", - "group": "c9b3e02a2ade5f4f", - "order": 1, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "COT_URL", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 600, - "y": 520, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "b87a918bdc4910dc", - "type": "switch", - "z": "4fa67ac9ec0c7369", - "name": "", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "nnull" - } - ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 230, - "y": 440, - "wires": [ - [ - "bcd4f9fe3ff42a97" - ] - ] - }, - { - "id": "2f25f0b243e59af1", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "PYTAK_MULTICAST_LOCAL_ADDR", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "PYTAK_MULTICAST_LOCAL_ADDR", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 690, - "y": 560, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "2f521601ceea7ce4", - "type": "ui_text", - "z": "4fa67ac9ec0c7369", - "group": "703b3b0940030133", - "order": 2, - "width": 15, - "height": 1, - "name": "", - "label": "NODE_ID", - "format": "{{msg.payload}}", - "layout": "row-left", - "className": "", - "style": false, - "font": "", - "fontSize": 16, - "color": "#000000", - "x": 600, - "y": 460, - "wires": [] - }, - { - "id": "cb87c8b4398c815d", - "type": "ui_button", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "", - "group": "1027f32817e150a0", - "order": 1, - "width": 0, - "height": 0, - "passthru": false, - "label": "Save Changes & Restart", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "", - "payload": "configs", - "payloadType": "flow", - "topic": "topic", - "topicType": "msg", - "x": 590, - "y": 200, - "wires": [ - [ - "a693d594320c6842", - "631f87c4233853a4" - ] - ] - }, - { - "id": "bcd4f9fe3ff42a97", - "type": "change", - "z": "4fa67ac9ec0c7369", - "name": "", - "rules": [ - { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "parts.key", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 260, - "y": 560, - "wires": [ - [ - "b29ad47e816eeb8a" - ] - ] - }, - { - "id": "90bbf3ddaabf55d6", - "type": "function", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "Remove nulls", - "func": "const pl = msg.payload;\nlet newpl = {};\n\nfor (const [key, value] of Object.entries(pl)) {\n if (value !== null) {\n newpl[key] = value\n }\n}\n\nmsg.payload = newpl;\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 560, - "y": 240, - "wires": [ - [ - "8f90b1c209f39ff8" - ] - ] - }, - { - "id": "70a02ab5c732adf0", - "type": "file", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "", - "filename": "tmpConfPath", - "filenameType": "msg", - "appendNewline": true, - "createDir": false, - "overwriteFile": "true", - "encoding": "none", - "x": 700, - "y": 280, - "wires": [ - [ - "83463f13b20d8ef3" - ] - ] - }, - { - "id": "8f90b1c209f39ff8", - "type": "function", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "Format ENV file", - "func": "const pl = msg.payload;\nlet newpl = `# ${msg.topic} Automatically created by AryaOS Dashboard.`;\n\nfor (const [key, value] of Object.entries(pl)) {\n if (value !== null) {\n newpl = `${newpl}\\n${key}=${value}`\n }\n}\n\nmsg.payload = newpl;\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 740, - "y": 240, - "wires": [ - [ - "e435961c35c6c50f" - ] - ] - }, - { - "id": "e435961c35c6c50f", - "type": "function", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "Use tmp file", - "func": "msg.tmpConfPath = msg.topic.replace(\"/boot/\", \"tmpConf/\")\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 550, - "y": 280, - "wires": [ - [ - "70a02ab5c732adf0" - ] - ] - }, - { - "id": "df765e01751751eb", - "type": "link in", - "z": "4fa67ac9ec0c7369", - "g": "c5409a5d2b5e28d5", - "name": "ADSBCOT-config.txt In", - "links": [ - "8ef58d62e7fd687c" - ], - "x": 505, - "y": 100, - "wires": [ - [ - "2d8066d127cb6c44", - "59b872f3a0bdee19" - ] - ] - }, - { - "id": "2d8066d127cb6c44", - "type": "function", - "z": "4fa67ac9ec0c7369", - "g": "c5409a5d2b5e28d5", - "name": "Set Cmd", - "func": "let realName = msg.filename.replace(\"tmpConf/\", \"/boot/\").replace(\"/home/node-red/\", \"\")\nmsg.payload = `sudo cp ${msg.filename} ${realName}`\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 620, - "y": 100, - "wires": [ - [ - "bb55ecc1c7a7da19", - "59b872f3a0bdee19" - ] - ] - }, - { - "id": "436315b0476f70b0", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "PYTAK_TLS_CLIENT_CERT", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "PYTAK_TLS_CLIENT_CERT", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 660, - "y": 600, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "9ebdda528d43e0ed", - "type": "ui_button", - "z": "4fa67ac9ec0c7369", - "name": "", - "group": "1027f32817e150a0", - "order": 1, - "width": 0, - "height": 0, - "passthru": true, - "label": "Load Configs", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "configs", - "payloadType": "flow", - "topic": "topic", - "topicType": "msg", - "x": 260, - "y": 200, - "wires": [ - [ - "9c77b6745bbb256f" - ] - ] - }, - { - "id": "f03da47ad91841c2", - "type": "split", - "z": "4fa67ac9ec0c7369", - "name": "", - "splt": "\\n", - "spltType": "str", - "arraySplt": 1, - "arraySpltType": "len", - "stream": false, - "addname": "topic", - "x": 230, - "y": 280, - "wires": [ - [ - "1c2d5f5bc8a23c60" - ] - ] - }, - { - "id": "1c2d5f5bc8a23c60", - "type": "file in", - "z": "4fa67ac9ec0c7369", - "name": "", - "filename": "payload", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 240, - "y": 320, - "wires": [ - [ - "20bb4cfcf85404b9" - ] - ] - }, - { - "id": "bb55ecc1c7a7da19", - "type": "link out", - "z": "4fa67ac9ec0c7369", - "g": "c5409a5d2b5e28d5", - "name": "Save Config Out", - "mode": "link", - "links": [ - "191a64ffb1ef6aac" - ], - "x": 725, - "y": 100, - "wires": [] - }, - { - "id": "21b1f508196e9b5a", - "type": "inject", - "z": "4fa67ac9ec0c7369", - "name": "", - "props": [], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "x": 150, - "y": 120, - "wires": [ - [ - "38dd95c8bf4641c3" - ] - ] - }, - { - "id": "38dd95c8bf4641c3", - "type": "function", - "z": "4fa67ac9ec0c7369", - "name": "Set Configs", - "func": "let configs = {\n \"/boot/AryaOS-config.txt\": {\n NODE_ID: null,\n COT_URL: \"udp+wo://239.2.3.1:6969\",\n PYTAK_MULTICAST_LOCAL_ADDR: \"0.0.0.0\",\n PYTAK_TLS_CLIENT_CERT: null,\n WIFI_AP_IP: \"10.41.0.1\",\n COT_ACCESS: \"UNCLASSIFIED\",\n STATIC_LAT: null,\n STATIC_LON: null,\n STATIC_ALT: null,\n },\n \"/boot/LINCOT-config.txt\": {\n GPS_INFO_CMD: null,\n CALLSIGN: null\n }\n}\n\nflow.set(\"configs\", configs)\n\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 250, - "y": 160, - "wires": [ - [ - "9ebdda528d43e0ed" - ] - ] - }, - { - "id": "9c77b6745bbb256f", - "type": "function", - "z": "4fa67ac9ec0c7369", - "name": "Set Files", - "func": "const configs = flow.get(\"configs\") || {}\nmsg.payload = Object.keys(configs)\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 240, - "y": 240, - "wires": [ - [ - "f03da47ad91841c2" - ] - ] - }, - { - "id": "52d59a8a443b3363", - "type": "change", - "z": "4fa67ac9ec0c7369", - "name": "/boot/AryaOS-config.txt", - "rules": [ - { - "t": "set", - "p": "filename", - "pt": "msg", - "to": "/boot/AryaOS-config.txt", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1000, - "y": 620, - "wires": [ - [ - "e0a10c197bb93cee" - ] - ] - }, - { - "id": "a693d594320c6842", - "type": "split", - "z": "4fa67ac9ec0c7369", - "g": "a247d145bc97ec4e", - "name": "", - "splt": "\\n", - "spltType": "str", - "arraySplt": 1, - "arraySpltType": "len", - "stream": false, - "addname": "topic", - "x": 770, - "y": 200, - "wires": [ - [ - "90bbf3ddaabf55d6" - ] - ] - }, - { - "id": "09f4ad56eb3fd133", - "type": "link in", - "z": "4fa67ac9ec0c7369", - "name": "Config in", - "links": [ - "99875f9d26d1f50e", - "b104d679e8967f58" - ], - "x": 105, - "y": 240, - "wires": [ - [ - "9c77b6745bbb256f" - ] - ] - }, - { - "id": "e0a10c197bb93cee", - "type": "function", - "z": "4fa67ac9ec0c7369", - "name": "Set Configs", - "func": "let configs = flow.get(\"configs\") || {};\n\nconfigs[msg.filename][msg.topic] = msg.payload\n\nflow.set(\"configs\", configs)\n\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1230, - "y": 620, - "wires": [ - [ - "8e27fbfb0a2496bb" - ] - ] - }, - { - "id": "7b2591633f69cff2", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "STATIC_LAT", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "STATIC_LAT", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 610, - "y": 680, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "f1a4b452b8ad0ff2", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "STATIC_LON", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "STATIC_LON", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 610, - "y": 720, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "631f87c4233853a4", - "type": "debug", - "z": "4fa67ac9ec0c7369", - "name": "debug 13", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 900, - "y": 140, - "wires": [] - }, - { - "id": "59b872f3a0bdee19", - "type": "debug", - "z": "4fa67ac9ec0c7369", - "name": "debug 14", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 860, - "y": 60, - "wires": [] - }, - { - "id": "83463f13b20d8ef3", - "type": "debug", - "z": "4fa67ac9ec0c7369", - "name": "debug 16", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 900, - "y": 320, - "wires": [] - }, - { - "id": "ff7a0b0653db330b", - "type": "ui_switch", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "Use Static Position?", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 6, - "width": 0, - "height": 0, - "passthru": true, - "decouple": "false", - "topic": "GPS_INFO_CMD", - "topicType": "str", - "style": "", - "onvalue": "/usr/local/bin/get_position.sh", - "onvalueType": "str", - "onicon": "", - "oncolor": "", - "offvalue": "null", - "offvalueType": "json", - "officon": "", - "offcolor": "", - "animate": false, - "className": "", - "x": 980, - "y": 680, - "wires": [ - [ - "68268787596399d6" - ] - ] - }, - { - "id": "68268787596399d6", - "type": "change", - "z": "4fa67ac9ec0c7369", - "name": "/boot/LINCOT-config.txt", - "rules": [ - { - "t": "set", - "p": "filename", - "pt": "msg", - "to": "/boot/LINCOT-config.txt", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1020, - "y": 740, - "wires": [ - [ - "e0a10c197bb93cee" - ] - ] - }, - { - "id": "8e27fbfb0a2496bb", - "type": "debug", - "z": "4fa67ac9ec0c7369", - "name": "debug 18", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 1280, - "y": 720, - "wires": [] - }, - { - "id": "7e3b2c1fde544a53", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "COT_ACCESS", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "COT_ACCESS", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 620, - "y": 760, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "5ad11569a70069c4", - "type": "ui_text_input", - "z": "4fa67ac9ec0c7369", - "name": "", - "label": "STATIC_ALT", - "tooltip": "", - "group": "c9b3e02a2ade5f4f", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "STATIC_ALT", - "sendOnBlur": true, - "className": "", - "topicType": "str", - "x": 610, - "y": 640, - "wires": [ - [ - "52d59a8a443b3363" - ] - ] - }, - { - "id": "cedb612803ec48f3", - "type": "ui_table", - "z": "898f970d26b5049d", - "group": "4f5d2f631860ad85", - "name": "", - "order": 3, - "width": "12", - "height": "15", - "columns": [ - { - "field": "id", - "title": "id", - "width": "2", - "align": "center", - "formatter": "rownum", - "formatterParams": { - "target": "_blank" - } - }, - { - "field": "label", - "title": "Label", - "width": "", - "align": "left", - "formatter": "plaintext", - "formatterParams": { - "target": "_blank" - } - }, - { - "field": "lastUpdate", - "title": "Updated", - "width": "", - "align": "left", - "formatter": "plaintext", - "formatterParams": { - "target": "_blank" - } - }, - { - "field": "battery", - "title": "Bat", - "width": "", - "align": "left", - "formatter": "progress", - "formatterParams": { - "target": "_blank" - } - }, - { - "field": "battery", - "title": "Bat%", - "width": "5", - "align": "left", - "formatter": "plaintext", - "formatterParams": { - "target": "_blank" - } - } - ], - "outputs": 1, - "cts": true, - "x": 750, - "y": 220, - "wires": [ - [] - ] - }, - { - "id": "1a05840c28615402", - "type": "function", - "z": "898f970d26b5049d", - "name": "Update User Table", - "func": "let pl = msg.payload;\n\nmsg.payload = {\n command: \"updateOrAddData\",\n arguments: [\n [\n {\n \"id\": pl.name,\n \"label\": pl.label || pl.name,\n \"lastUpdate\": pl.lastUpdate,\n 'battery': pl.battery\n }\n ]\n ]\n}\n\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 570, - "y": 220, - "wires": [ - [ - "cedb612803ec48f3", - "089d8cf88cede906" - ] - ] - }, - { - "id": "ca452dfdb255ad66", - "type": "ui_chart", - "z": "898f970d26b5049d", - "name": "", - "group": "4f5d2f631860ad85", - "order": 2, - "width": 0, - "height": 0, - "label": "chart", - "chartType": "line", - "legend": "true", - "xformat": "HH:mm", - "interpolate": "linear", - "nodata": "", - "dot": false, - "ymin": "", - "ymax": "", - "removeOlder": "3", - "removeOlderPoints": "", - "removeOlderUnit": "3600", - "cutout": 0, - "useOneColor": false, - "useUTC": false, - "colors": [ - "#1f77b4", - "#aec7e8", - "#ff7f0e", - "#2ca02c", - "#98df8a", - "#d62728", - "#ff9896", - "#9467bd", - "#c5b0d5" - ], - "outputs": 1, - "useDifferentColor": false, - "className": "", - "x": 750, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "95a794098ccf72a6", - "type": "function", - "z": "898f970d26b5049d", - "name": "Update Battery Graph", - "func": "let pl = msg.payload;\n\nmsg.payload = {\n command: \"updateOrAddData\",\n arguments: [\n [\n {\n \"id\": pl.name,\n \"label\": pl.label || pl.name,\n \"lastUpdate\": pl.lastUpdate,\n 'battery': pl.battery\n }\n ]\n ]\n}\n\nmsg.topic = pl.label || pl.name;\nmsg.payload = pl.battery;\n\nreturn msg;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 580, - "y": 260, - "wires": [ - [ - "ca452dfdb255ad66" - ] - ] - }, - { - "id": "7c699e7f158dc0d5", - "type": "link in", - "z": "898f970d26b5049d", - "name": "TAK Dashboard In", - "links": [ - "089a5c1ffeafe91b" - ], - "x": 175, - "y": 240, - "wires": [ - [ - "ddb04bc04415d51e" - ] - ] - }, - { - "id": "ddb04bc04415d51e", - "type": "tak2wm", - "z": "898f970d26b5049d", - "name": "TAK2Worldmap", - "x": 300, - "y": 240, - "wires": [ - [ - "1a05840c28615402", - "95a794098ccf72a6", - "16f795d55dda4729" - ] - ] - }, - { - "id": "089d8cf88cede906", - "type": "debug", - "z": "898f970d26b5049d", - "name": "debug 4", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 700, - "y": 160, - "wires": [] - }, - { - "id": "16f795d55dda4729", - "type": "debug", - "z": "898f970d26b5049d", - "name": "debug 5", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 460, - "y": 140, - "wires": [] - }, - { - "id": "dc87e7e88303ec78", - "type": "link in", - "z": "f8d4ccf4360ea706", - "name": "Sit(x) In", - "links": [ - "089a5c1ffeafe91b", - "ddb201c5df845268" - ], - "x": 175, - "y": 100, - "wires": [ - [ - "7ff44de3e1b9f7ce" - ] - ] - }, - { - "id": "7ff44de3e1b9f7ce", - "type": "tak", - "z": "f8d4ccf4360ea706", - "name": "TAK", - "x": 270, - "y": 100, - "wires": [ - [ - "d13138584cc78f08" - ], - [], - [] - ] - }, - { - "id": "d13138584cc78f08", - "type": "tak", - "z": "f8d4ccf4360ea706", - "name": "TAK", - "x": 390, - "y": 100, - "wires": [ - [ - "058bbbd3ada7d52d" - ], - [], - [] - ] - }, - { - "id": "058bbbd3ada7d52d", - "type": "Sit(x) Node", - "z": "f8d4ccf4360ea706", - "d": true, - "name": "", - "sitx_config": "", - "x": 530, - "y": 100, - "wires": [ - [] - ] - } -] diff --git a/stage7-sea/00-install/files/aiscatcher.conf b/stage7-sea/00-install/files/aiscatcher.conf deleted file mode 100644 index 0252b8e..0000000 --- a/stage7-sea/00-install/files/aiscatcher.conf +++ /dev/null @@ -1,2 +0,0 @@ - -u 127.0.0.1 2222 - -e 368400 /dev/serial1 \ No newline at end of file diff --git a/stage7-sea/00-install/files/aiscatcher.service b/stage7-sea/00-install/files/aiscatcher.service deleted file mode 100644 index a54b527..0000000 --- a/stage7-sea/00-install/files/aiscatcher.service +++ /dev/null @@ -1,36 +0,0 @@ -# AryaOS aiscatcher.service -# -# aiscatcher service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=aiscatcher -PartOf=AryaSea.service -After=AryaSea.service - -[Service] -User=aiscatcher -RuntimeDirectory=aiscatcher -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_aiscatcher.sh -SyslogIdentifier=aiscatcher -Type=simple -Restart=on-failure -RestartSec=30 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaSea.service \ No newline at end of file diff --git a/stage7-sea/00-install/files/enable_AryaSea.sh b/stage7-sea/00-install/files/enable_AryaSea.sh deleted file mode 100755 index 06f2e21..0000000 --- a/stage7-sea/00-install/files/enable_AryaSea.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# AryaOS enable_AryaSea.sh -# -# Enables AryaSea services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -set +a -logger "Enabling AryaSea services." -systemctl enable AryaSea --now -systemctl enable AISCOT --now -systemctl enable aiscatcher --now -systemctl enable LINCOT --now - -# FIXME: Normalize Node-RED dashboard: -sed --follow-symlinks -i -E -e "s/flowFile:.*,/flowFile: 'AryaSea_flows.json',/" /home/node-red/.node-red/settings.js \ No newline at end of file diff --git a/stage7-sea/00-install/files/install-aiscatcher.sh b/stage7-sea/00-install/files/install-aiscatcher.sh deleted file mode 100755 index 9fea16a..0000000 --- a/stage7-sea/00-install/files/install-aiscatcher.sh +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/bash - -set -e -trap 'echo "[ERROR] Error in line $LINENO when executing: $BASH_COMMAND"' ERR - -INSTALL_FOLDER=/usr/share/aiscatcher -echo "Creating folder aiscatcher if it does not exist" -mkdir -p ${INSTALL_FOLDER} - -function create-config(){ -echo "Creating config file aiscatcher.conf" -CONFIG_FILE=${INSTALL_FOLDER}/aiscatcher.conf -touch ${CONFIG_FILE} -chmod 777 ${CONFIG_FILE} -echo "Writing code to config file aiscatcher.conf" -/bin/cat <${CONFIG_FILE} - -d 00000162 - -v 10 - -M DT - -gr TUNER 38.6 RTLAGC off - -s 2304k - -p 3 - -o 4 - -u 127.0.0.1 10110 - -N 8383 - -N PLUGIN_DIR /usr/share/aiscatcher/my-plugins -EOM -chmod 644 ${CONFIG_FILE} -} - - -if [[ -f "${INSTALL_FOLDER}/aiscatcher.conf" ]]; then - CHOICE=$(whiptail --title "CONFIG" --menu "An existing config file 'aiscatcher.conf' found. What you want to do with it?" 20 70 5 \ - "1" "KEEP existing config file \"aiscatcher.conf\" " \ - "2" "REPLACE existing config file by default config file" 3>&1 1>&2 2>&3); - if [[ ${CHOICE} == "2" ]]; then - if (whiptail --title "Confirmation" --yesno "Are you sure you want to REPLACE your existing config file by default config File?" --defaultno 10 60 5 ); then - echo "Saving old config file as \"aiscatcher.conf.old\" "; - cp ${INSTALL_FOLDER}/aiscatcher.conf ${INSTALL_FOLDER}/aiscatcher.conf.old; - create-config - fi - fi - -elif [[ ! -f "${INSTALL_FOLDER}/aiscatcher.conf" ]]; then - create-config -fi - -echo "Creating startup script file start-ais.sh" -SCRIPT_FILE=${INSTALL_FOLDER}/start-ais.sh -touch ${SCRIPT_FILE} -chmod 777 ${SCRIPT_FILE} -echo "Writing code to startup script file start-ais.sh" -/bin/cat <${SCRIPT_FILE} -#!/bin/sh -CONFIG="" -while read -r line; do CONFIG="\${CONFIG} \$line"; done < ${INSTALL_FOLDER}/aiscatcher.conf -cd ${INSTALL_FOLDER} -/usr/local/bin/AIS-catcher \${CONFIG} -EOM -chmod +x ${SCRIPT_FILE} - - -echo "Creating Service file aiscatcher.service" -SERVICE_FILE=/lib/systemd/system/aiscatcher.service -touch ${SERVICE_FILE} -chmod 777 ${SERVICE_FILE} -/bin/cat <${SERVICE_FILE} -# AIS-catcher service for systemd -[Unit] -Description=AIS-catcher -Wants=network.target -After=network.target -[Service] -User=aiscat -RuntimeDirectory=aiscatcher -RuntimeDirectoryMode=0755 -ExecStart=/bin/bash ${INSTALL_FOLDER}/start-ais.sh -SyslogIdentifier=aiscatcher -Type=simple -Restart=on-failure -RestartSec=30 -RestartPreventExitStatus=64 -Nice=-5 -[Install] -WantedBy=default.target - -EOM - -chmod 644 ${SERVICE_FILE} -systemctl enable aiscatcher - - -echo "Entering install folder..." -cd ${INSTALL_FOLDER} - -if [[ -d AIS-catcher ]]; -then -echo -e "\e[36mcode exists \e[39m" - -else -echo -e "\e[36mCloning source-code of AIS-catcher from Github \e[39m" -git clone https://github.com/jvde-github/AIS-catcher.git -fi - -echo -e "\e[36mUpdating code \e[39m" -cd AIS-catcher -git config --global --add safe.directory ${INSTALL_FOLDER}/AIS-catcher -git fetch --all -git reset --hard origin/main - -if [[ -d build ]]; -then -rm -rf build -fi - -echo -e "\e[36mMaking executable binary \e[39m" -mkdir -p build -cd build -cmake .. -make -echo "Copying AIS-catcher binary in folder /usr/local/bin/ " -if [[ -f "${INSTALL_FOLDER}/AIS-catcher/build/AIS-catcher" ]]; then - echo "Stoping existing aiscatcher to enable over-write" - systemctl stop aiscatcher - if [[ `pgrep AIS-catcher` ]]; then - killall AIS-catcher - fi - echo "Copying newly built binary \"AIS-catcher\" to folder \"/usr/local/bin/\" " - cp ${INSTALL_FOLDER}/AIS-catcher/build/AIS-catcher /usr/local/bin/AIS-catcher - -elif [[ ! -f "${INSTALL_FOLDER}/AIS-catcher/build/AIS-catcher" ]]; then - echo " " - echo -e "\e[1;31mAIS binary was not built\e[39m" - echo -e "\e[1;31mPlease run install script again\e[39m" - exit -fi - -echo "Renaming existing folder \"my-plugins\" to \"my-plugins.old\" " -if [[ -d ${INSTALL_FOLDER}/my-plugins.old ]]; -then -rm -rf ${INSTALL_FOLDER}/my-plugins.old -fi - -if [[ -d ${INSTALL_FOLDER}/my-plugins ]]; -then -mv ${INSTALL_FOLDER}/my-plugins ${INSTALL_FOLDER}/my-plugins.old -fi -echo "Copying files from Source code folder \"AIS-catcher/plugins\" to folder \"my-plugins\" " -mkdir ${INSTALL_FOLDER}/my-plugins -cp ${INSTALL_FOLDER}/AIS-catcher/plugins/* ${INSTALL_FOLDER}/my-plugins/ - -if [[ ! `id -u aiscat` ]]; then -echo "Creating user aiscat to run AIS-catcher" -useradd --system aiscat -usermod -a -G plugdev aiscat -else -echo "User aiscat already exists. Not creating it again" -fi - -echo "Assigning ownership of install folder to user aiscat" -chown aiscat:aiscat -R ${INSTALL_FOLDER} - -systemctl start aiscatcher - -echo " " -echo " " -echo -e "\e[32mINSTALLATION COMPLETED \e[39m" -echo -e "\e[32m=======================\e[39m" -echo -e "\e[32mPLEASE DO FOLLOWING:\e[39m" -echo -e "\e[32m=======================\e[39m" - -echo -e "\e[33m(1) If on RPi you have installed AIS Dispatcher or OpenCPN,\e[39m" -echo -e "\e[33m it should be configured to use UDP Port 10110, IP 127.0.0.1 OR 0.0.0.0\e[39m" - -echo -e "\e[33m(2) Open file aiscatcher.conf by following command:\e[39m" -echo -e "\e[39m sudo nano "${INSTALL_FOLDER}"/aiscatcher.conf \e[39m" -echo -e "\e[33m(3) In above file:\e[39m" -echo -e "\e[33m (a) Change 00000162 in \"-d 00000162\" to actual Serial Number of AIS dongle\e[39m" -echo -e "\e[33m (b) Change 3 in \"-p 3\" to the actual ppm correction figure of dongle\e[39m" -echo -e "\e[33m (c) Change 38.6 in \"-gr TUNER 38.6 RTLAGC off\" to desired Gain of dongle\e[39m" -echo -e "\e[33m (d) Add following line and replace xx.xxx and yy.yyy by actual values:\e[39m" -echo -e "\e[35m -N STATION MyStation LAT xx.xxx LON yy.yyy \e[39m" -echo -e "\e[33m (e) For each Site you want to feed AIS data, add a new line as follows:\e[39m" -echo -e "\e[35m -u [URL or IP of Site] [Port Number of Site] \e[39m" -echo -e "\e[33m (f) Save (Ctrl+o) and Close (Ctrl+x) file aiscatcher.conf \e[39m" -echo " " -echo -e "\e[01;31mIMPORTANT: \e[32mIf you are \e[01;31mUpgrading or Reinstalling,\e[32myour old config file & pluin folder are saved as \e[39m" -echo -e "\e[39m "${INSTALL_FOLDER}/aiscatcher.conf.old" \e[39m" -echo -e "\e[39m "${INSTALL_FOLDER}/my-plugins.old" \e[39m" -echo " " -echo -e "\e[01;31m(4) REBOOT RPi ... REBOOT RPi ... REBOOT RPi \e[39m" -echo " " -echo -e "\e[01;32m(5) See the Web Interface (Map etc) at\e[39m" -echo -e "\e[39m $(ip route | grep -m1 -o -P 'src \K[0-9,.]*'):8383 \e[39m" "\e[35m(IP-of-PI:8383) \e[39m" -echo " " -echo -e "\e[32m(6) Command to see Status\e[39m sudo systemctl status aiscatcher" -echo -e "\e[32m(7) Command to Restart\e[39m sudo systemctl restart aiscatcher" diff --git a/stage7-sea/00-install/files/install_dispatcher b/stage7-sea/00-install/files/install_dispatcher deleted file mode 100644 index 8dfcf91..0000000 --- a/stage7-sea/00-install/files/install_dispatcher +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash - -VER="latest" -if [ ! -z "$1" ]; then - VER="$1" -fi -PACKAGE="full.tar.bz2" -MD5="full.tar.bz2.md5" -PACKAGE_URL="https://www.aishub.net/downloads/dispatcher/packages/${VER}/${PACKAGE}" -MD5_URL="https://www.aishub.net/downloads/dispatcher/packages/${VER}/${MD5}" -DOWNLOAD_DIR="/tmp/dispatcher_download_${VER}" - -[ ! -d "$DOWNLOAD_DIR" ] && mkdir "$DOWNLOAD_DIR" - -PM="$(which "apt-get")" && [ ! -z "$PM" ] && PM="$PM install" -[ -z "$PM" ] && PM="$(which "yay")" && [ ! -z "$PM" ] && PM="$PM -S" - -echo ':: Check dependencies' -WGET="$(which "wget")" -if [ ! -x "$WGET" ]; then - echo ' wget executable not found. Please install it' - exit 1 -fi -WGET="${WGET} -q --show-progress" - -if ! which aha >/dev/null; then - echo ' Warning "aha" (Ansi HTML Adapter) executable not found!' - echo ' In order to have console like colors, "aha" must be installed.' - echo ' Debian derivatives "apt-get install aha"' - echo ' Arch Linux derivatives (AUR) "yay -S aha"' - - echo - if [ ! -z "$PM" ]; then - read -p " Install \"aha\" ($PM aha)? [Y/n] " ANSWER - if [[ "$ANSWER" =~ ^([Yy]|)$ ]]; then - $PM aha || exit 1 - fi - fi - - if ! which aha >/dev/null; then - read -p ' Proceed with installation (without aha)? [y/N] ' ANSWER - if [[ "$ANSWER" =~ ^([Nn]|)$ ]]; then - echo 'Abort' - exit 1 - fi - fi -fi - -check_status() { - echo ':: Check files' - if [ -f "$PACKAGE" ] && [ -f "$MD5" ] && md5sum --quiet -c "$MD5" ; then - return 0 - fi - return 1 -} - -cd "$DOWNLOAD_DIR" -if ! check_status; then - echo ":: Download version '${VER}'" - $WGET "$PACKAGE_URL" - $WGET "$MD5_URL" - if ! check_status; then - echo 'Download failed' - exit 1 - fi -fi - -echo ':: Add user "ais"' -if id --user 'ais' >/dev/null 2>&1; then - read -p ' User "ais" already exists. Proceed with installation? [Y/n] ' ANSWER - if [[ "$ANSWER" =~ ^[Nn]$ ]]; then - echo 'Abort' - exit 1 - fi -else - if ! useradd -m -s "/bin/false" -c "AIS Dispatcher" ais; then - echo 'Cannot create user "ais"' - exit 1 - fi -fi - -if getent group 'systemd-journal' >/dev/null; then - echo ':: Join user "ais" to "systemd-journal" group (view log)' - usermod -a -G systemd-journal ais -fi - -if getent group 'dialout' >/dev/null; then - usermod -a -G dialout ais -else - echo ' If you are using a serial device connection to your AIS receiver,' - echo ' AIS dispatcher will need read permission from that device.' - read -p ' Please enter the group that owns your serial device [skip]: ' ANSWER - if [ ! -z "$ANSWER" ] && [ "$ANSWER" != "skip" ]; then - if ! getent group "$ANSWER" >/dev/null; then - echo "group '$ANSWER' does not exist" - exit 1 - fi - usermod -a -G "$ANSWER" ais - fi -fi - -echo ':: Extract archive' -tar xfj "$PACKAGE" -C /home/ais - -echo ':: Enable auto start' -loginctl enable-linger ais - -echo -echo 'Install complete' -echo 'By default web interface is accessible at http://IPADDRESS:8080/' -echo 'To change default listening host/port check "/home/ais/etc/aiscontrol.cfg"' -echo 'To disable auto start execute "loginctl disable-linger ais"' -echo -echo ':: Available IP Addresses' -ip -br address show up scope global diff --git a/stage7-sea/00-install/files/uart_control b/stage7-sea/00-install/files/uart_control deleted file mode 100644 index f27335b..0000000 --- a/stage7-sea/00-install/files/uart_control +++ /dev/null @@ -1,321 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2017 Ilker Temir -# -# Based on raspi-config by Alex Bradbury -# -# Licensed under MIT License -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE.# - -CONFIG=/boot/config.txt -CMDLINE=/boot/cmdline.txt - -is_pione() { - if grep -q "^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$" /proc/cpuinfo; then - return 0 - elif grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$" /proc/cpuinfo ; then - return 0 - else - return 1 - fi -} - -is_pifour() { - grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$" /proc/cpuinfo - return $? -} - -is_pithree() { - grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[8d][0-9a-fA-F]$" /proc/cpuinfo - return $? -} - -is_pitwo() { - grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$" /proc/cpuinfo - return $? -} - -is_pizero() { - grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$" /proc/cpuinfo - return $? -} - -get_pi_type() { - if is_pione; then - echo 1 - elif is_pitwo; then - echo 2 - elif is_pithree; then - echo 3 - elif is_pifour; then - echo 4 - elif is_pizero; then - echo 0 - else - echo "unknown" - fi -} - -get_init_sys() { - if command -v systemctl > /dev/null && systemctl | grep -q '\-\.mount'; then - SYSTEMD=1 - elif [ -f /etc/init.d/cron ] && [ ! -h /etc/init.d/cron ]; then - SYSTEMD=0 - else - echo "Unrecognised init system" - return 1 - fi -} - -set_config_var() { - lua - "$1" "$2" "$3" < "$3.bak" -local key=assert(arg[1]) -local value=assert(arg[2]) -local fn=assert(arg[3]) -local file=assert(io.open(fn)) -local made_change=false -for line in file:lines() do - if line:match("^#?%s*"..key.."=.*$") then - line=key.."="..value - made_change=true - end - print(line) -end - -if not made_change then - print(key.."="..value) -end -EOF -mv "$3.bak" "$3" -} - -clear_config_var() { - lua - "$1" "$2" < "$2.bak" -local key=assert(arg[1]) -local fn=assert(arg[2]) -local file=assert(io.open(fn)) -for line in file:lines() do - if line:match("^%s*"..key.."=.*$") then - line="#"..line - end - print(line) -end -EOF -mv "$2.bak" "$2" -} - -get_config_var() { - lua - "$1" "$2" <> /etc/inittab - fi - fi - if grep -q "console=ttyAMA0" $CMDLINE ; then - if [ -e /proc/device-tree/aliases/serial0 ]; then - sed -i $CMDLINE -e "s/console=ttyAMA0/console=serial0/" - fi - elif ! grep -q "console=ttyAMA0" $CMDLINE && ! grep -q "console=serial0" $CMDLINE ; then - if [ -e /proc/device-tree/aliases/serial0 ]; then - sed -i $CMDLINE -e "s/root=/console=serial0,115200 root=/" - else - sed -i $CMDLINE -e "s/root=/console=ttyAMA0,115200 root=/" - fi - fi - elif [ $1 = "disable" ]; then - if [ $SYSTEMD -eq 0 ]; then - sed -i /etc/inittab -e "s|^.*:.*:respawn:.*ttyAMA0|#&|" - fi - sed -i $CMDLINE -e "s/console=ttyAMA0,[0-9]\+ //" - sed -i $CMDLINE -e "s/console=serial0,[0-9]\+ //" - fi -} - -bluetooth_status() { - if is_pifour; then - if grep -q -E "^dtoverlay=disable-bt" $CONFIG; then - echo "disabled" - else - echo "enabled" - fi - elif is_pithree; then - if grep -q -E "^dtoverlay=pi3-disable-bt" $CONFIG; then - echo "disabled" - else - echo "enabled" - fi - else - echo "N/A" - fi -} - -set_bluetooth() { - if [ $1 = "enable" ]; then - if is_pithree; then - sed $CONFIG -i -e "s/^dtoverlay=pi3-disable-bt/#dtoverlay=pi3-disable-bt/" - else - sed $CONFIG -i -e "s/^dtoverlay=disable-bt/#dtoverlay=disable-bt/" - fi - systemctl enable hciuart - elif [ $1 = "disable" ]; then - if is_pithree; then - sed $CONFIG -i -e "s/^#dtoverlay=pi3-disable-bt/dtoverlay=pi3-disable-bt/" - if ! grep -q -E "^dtoverlay=pi3-disable-bt" $CONFIG; then - printf "# Comment the following line to enable Bluetooth\n" >> $CONFIG - printf "dtoverlay=pi3-disable-bt\n" >> $CONFIG - fi - else - sed $CONFIG -i -e "s/^#dtoverlay=disable-bt/dtoverlay=disable-bt/" - if ! grep -q -E "^dtoverlay=disable-bt" $CONFIG; then - printf "# Comment the following line to enable Bluetooth\n" >> $CONFIG - printf "dtoverlay=disable-bt\n" >> $CONFIG - fi - fi - systemctl disable hciuart - fi -} - -uart_status() { - uart=$(get_config_var enable_uart $CONFIG) - if [ $uart -eq 0 ]; then - echo "disabled" - elif [ $uart -eq 1 ]; then - echo "enabled" - fi -} - -set_uart() { - if [ $1 = "enable" ]; then - set_config_var enable_uart 1 $CONFIG - else - set_config_var enable_uart 0 $CONFIG - fi -} - -get_init_sys - -if [ $(id -u) -ne 0 ]; then - printf "Script must be run as root. Try 'sudo $0'\n" - exit 1 -fi - -for i in $* -do - case $i in - gpio) - printf "Enabling UART.\n" - set_uart enable - printf "Disabling console on UART.\n" - set_console disable - if is_pithree || is_pifour; then - printf "Disabling Bluetooth.\n" - set_bluetooth disable - else - printf "Bluetooth is not available on Raspberry Pi $(get_pi_type).\n" - fi - printf "\n" - printf "UART made available on GPIO 14 & 15.\n" - printf "You now need to reboot.\n" - exit 1 - ;; - default) - printf "Enabling UART.\n" - set_uart enable - printf "Enabling console on UART.\n" - set_console enable - if is_pithree || is_pifour; then - printf "Enabling Bluetooth.\n" - set_bluetooth enable - else - printf "Bluetooth is not available on Raspberry Pi $(get_pi_type).\n" - fi - printf "\n" - printf "Default system settings restored.\n" - printf "You now need to reboot.\n" - exit 1 - ;; - status) - pitype=$(get_pi_type) - console=$(console_status) - uart=$(uart_status) - bluetooth=$(bluetooth_status) - - printf "Raspberry Pi : $pitype\n" - printf "Console : $console\n" - printf "UART : $uart\n" - printf "Bluetooth : $bluetooth\n" - - if [ "$console" = disabled ] && \ - [ "$uart" = enabled ] && \ - [ "$bluetooth" != enabled ]; then - printf "\n" - printf "UART is available to GPIO 14 & 15.\n" - else - printf "\n" - printf "UART is NOT available$ to GPIO 14 & 15.\n" - fi - exit 1 - ;; - *) - # unknown option - printf "Unknown option\n" - exit 1 - ;; - esac -done - -printf "Usage:\n" -printf " $0 [ OPTION ]\n" -printf " default Restores original state\n" -printf " gpio Makes UART available on GPIO pins 14 & 15\n" -printf " status Displays current status\n" - diff --git a/stage7-sea/prerun.sh b/stage7-sea/prerun.sh deleted file mode 100755 index 9acd13c..0000000 --- a/stage7-sea/prerun.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage8-uas/00-install/00-run.sh b/stage8-uas/00-install/00-run.sh deleted file mode 100755 index d1d3c71..0000000 --- a/stage8-uas/00-install/00-run.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -install -v -m 644 files/AryaUAS.service "${ROOTFS_DIR}/lib/systemd/system/" -install -v -m 755 files/enable_AryaUAS.sh "${ROOTFS_DIR}/usr/local/sbin" -# install -v -m 644 "files/AryaUAS_flows.json" "${ROOTFS_DIR}/home/node-red/.node-red" - -export APP_NAME="DroneCOT" -install -v -m 644 "files/${APP_NAME}-config.txt" "${ROOTFS_DIR}/boot/" -install -v -m 755 "files/run_${APP_NAME}.sh" "${ROOTFS_DIR}/usr/local/sbin/" -install -v -m 644 "files/${APP_NAME}.service" "${ROOTFS_DIR}/lib/systemd/system/" - -rsync -va files/docker-uas-broker "${ROOTFS_DIR}/home/pi/" -rsync -va files/docker-uas-sensor "${ROOTFS_DIR}/home/pi/" \ No newline at end of file diff --git a/stage8-uas/00-install/01-run-chroot.sh b/stage8-uas/00-install/01-run-chroot.sh deleted file mode 100755 index 13cd2ca..0000000 --- a/stage8-uas/00-install/01-run-chroot.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -id dronecot || useradd --system dronecot - -python3 -m pip install dronecot --break-system-packages - -systemctl disable DroneCOT -systemctl disable AryaUAS diff --git a/stage8-uas/00-install/files/AryaUAS.service b/stage8-uas/00-install/files/AryaUAS.service deleted file mode 100644 index 6a6a5fb..0000000 --- a/stage8-uas/00-install/files/AryaUAS.service +++ /dev/null @@ -1,30 +0,0 @@ -# AryaOS AryaUAS.service -# -# Meta-app for AryaOS UAS SA services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=AryaUAS: Meta-app for AryaOS UAS SA services. -Documentation=https://github.com/SNSTAC/AryaOS -Wants=network.target -After=network.target - -[Service] -Type=oneshot -ExecStart=/bin/true -RemainAfterExit=yes - -[Install] -WantedBy=default.target diff --git a/stage8-uas/00-install/files/DroneCOT.service b/stage8-uas/00-install/files/DroneCOT.service deleted file mode 100644 index 2c651dc..0000000 --- a/stage8-uas/00-install/files/DroneCOT.service +++ /dev/null @@ -1,37 +0,0 @@ -# AryaOS DroneCOT.service -# -# DroneCOT service for systemd -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -[Unit] -Description=DroneCOT: Open Drone ID to TAK Gateway -Documentation=https://github.com/SNSTAC/DroneCOT -PartOf=AryaUAS.service -After=AryaUAS.service - -[Service] -User=dronecot -RuntimeDirectory=DroneCOT -RuntimeDirectoryMode=0755 -ExecStart=/usr/local/sbin/run_DroneCOT.sh -SyslogIdentifier=DroneCOT -Type=simple -Restart=always -RestartSec=20 -RestartPreventExitStatus=64 -Nice=-5 - -[Install] -WantedBy=AryaUAS.service diff --git a/stage8-uas/00-install/files/enable_AryaUAS.sh b/stage8-uas/00-install/files/enable_AryaUAS.sh deleted file mode 100755 index 03bd2f9..0000000 --- a/stage8-uas/00-install/files/enable_AryaUAS.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# AryaOS enable_AryaUAS.sh -# -# Enables AryaUAS services. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" - -set +a -logger "Enabling AryaUAS services." -systemctl enable AryaUAS --now -systemctl enable DroneCOT --now -systemctl enable LINCOT --now - -# cd /home/pi/docker-uas-broker -# docker compose up -d - -# cd /home/pi/docker-uas-sensor -# docker compose up -d - -# sed --follow-symlinks -i -E -e "s/flowFile:.*,/flowFile: 'AryaUAS_flows.json',/" /home/node-red/.node-red/settings.js \ No newline at end of file diff --git a/stage8-uas/00-install/files/run_DroneCOT.sh b/stage8-uas/00-install/files/run_DroneCOT.sh deleted file mode 100755 index 08d9bb6..0000000 --- a/stage8-uas/00-install/files/run_DroneCOT.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# AryaOS run_DroneCOT.sh -# -# Startup file for DroneCOT. -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -a -AOS_CONFIG="/boot/${AOS_FLAVOR:-AryaOS}-config.txt" -TOOL_CONFIG="/boot/DroneCOT-config.txt" - -if [ -f $AOS_CONFIG ]; then - . $AOS_CONFIG -fi - -if [ -f $TOOL_CONFIG ]; then - . $TOOL_CONFIG -fi - -set +a - -modprobe -r rtw88_8821cu || true -modprobe rtw88_8821cu rtw_power_mgnt=0 rtw_ips_mode=0 rtw_enusbss=0 || true -nmcli dev set wlan0 managed no || true -nmcli dev set wlan1 managed no || true -nmcli dev set wlan2 managed no || true -nmcli dev set wlan3 managed no || true - -/usr/local/bin/dronecot diff --git a/stage8-uas/prerun.sh b/stage8-uas/prerun.sh deleted file mode 100755 index 9acd13c..0000000 --- a/stage8-uas/prerun.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi diff --git a/stage9-docker/00-prepare/00-packages b/stage9-docker/00-prepare/00-packages deleted file mode 100644 index a779e5d..0000000 --- a/stage9-docker/00-prepare/00-packages +++ /dev/null @@ -1 +0,0 @@ -ca-certificates diff --git a/stage9-docker/00-prepare/00-run.sh b/stage9-docker/00-prepare/00-run.sh deleted file mode 100755 index 5d172b0..0000000 --- a/stage9-docker/00-prepare/00-run.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -e -# AryaOS 00-run.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -install -m 0755 -d "${ROOTFS_DIR}/etc/apt/keyrings" -install -v -m 644 files/docker.asc "${ROOTFS_DIR}/etc/apt/keyrings/docker.asc" -chmod a+r "${ROOTFS_DIR}/etc/apt/keyrings/docker.asc" - -install -v -m 644 files/docker.list "${ROOTFS_DIR}/etc/apt/sources.list.d/docker.list" diff --git a/stage9-docker/00-prepare/files/docker.asc b/stage9-docker/00-prepare/files/docker.asc deleted file mode 100644 index ee7872e..0000000 --- a/stage9-docker/00-prepare/files/docker.asc +++ /dev/null @@ -1,62 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBFit2ioBEADhWpZ8/wvZ6hUTiXOwQHXMAlaFHcPH9hAtr4F1y2+OYdbtMuth -lqqwp028AqyY+PRfVMtSYMbjuQuu5byyKR01BbqYhuS3jtqQmljZ/bJvXqnmiVXh -38UuLa+z077PxyxQhu5BbqntTPQMfiyqEiU+BKbq2WmANUKQf+1AmZY/IruOXbnq -L4C1+gJ8vfmXQt99npCaxEjaNRVYfOS8QcixNzHUYnb6emjlANyEVlZzeqo7XKl7 -UrwV5inawTSzWNvtjEjj4nJL8NsLwscpLPQUhTQ+7BbQXAwAmeHCUTQIvvWXqw0N -cmhh4HgeQscQHYgOJjjDVfoY5MucvglbIgCqfzAHW9jxmRL4qbMZj+b1XoePEtht -ku4bIQN1X5P07fNWzlgaRL5Z4POXDDZTlIQ/El58j9kp4bnWRCJW0lya+f8ocodo -vZZ+Doi+fy4D5ZGrL4XEcIQP/Lv5uFyf+kQtl/94VFYVJOleAv8W92KdgDkhTcTD -G7c0tIkVEKNUq48b3aQ64NOZQW7fVjfoKwEZdOqPE72Pa45jrZzvUFxSpdiNk2tZ -XYukHjlxxEgBdC/J3cMMNRE1F4NCA3ApfV1Y7/hTeOnmDuDYwr9/obA8t016Yljj -q5rdkywPf4JF8mXUW5eCN1vAFHxeg9ZWemhBtQmGxXnw9M+z6hWwc6ahmwARAQAB -tCtEb2NrZXIgUmVsZWFzZSAoQ0UgZGViKSA8ZG9ja2VyQGRvY2tlci5jb20+iQI3 -BBMBCgAhBQJYrefAAhsvBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEI2BgDwO -v82IsskP/iQZo68flDQmNvn8X5XTd6RRaUH33kXYXquT6NkHJciS7E2gTJmqvMqd -tI4mNYHCSEYxI5qrcYV5YqX9P6+Ko+vozo4nseUQLPH/ATQ4qL0Zok+1jkag3Lgk -jonyUf9bwtWxFp05HC3GMHPhhcUSexCxQLQvnFWXD2sWLKivHp2fT8QbRGeZ+d3m -6fqcd5Fu7pxsqm0EUDK5NL+nPIgYhN+auTrhgzhK1CShfGccM/wfRlei9Utz6p9P -XRKIlWnXtT4qNGZNTN0tR+NLG/6Bqd8OYBaFAUcue/w1VW6JQ2VGYZHnZu9S8LMc -FYBa5Ig9PxwGQOgq6RDKDbV+PqTQT5EFMeR1mrjckk4DQJjbxeMZbiNMG5kGECA8 -g383P3elhn03WGbEEa4MNc3Z4+7c236QI3xWJfNPdUbXRaAwhy/6rTSFbzwKB0Jm -ebwzQfwjQY6f55MiI/RqDCyuPj3r3jyVRkK86pQKBAJwFHyqj9KaKXMZjfVnowLh -9svIGfNbGHpucATqREvUHuQbNnqkCx8VVhtYkhDb9fEP2xBu5VvHbR+3nfVhMut5 -G34Ct5RS7Jt6LIfFdtcn8CaSas/l1HbiGeRgc70X/9aYx/V/CEJv0lIe8gP6uDoW -FPIZ7d6vH+Vro6xuWEGiuMaiznap2KhZmpkgfupyFmplh0s6knymuQINBFit2ioB -EADneL9S9m4vhU3blaRjVUUyJ7b/qTjcSylvCH5XUE6R2k+ckEZjfAMZPLpO+/tF -M2JIJMD4SifKuS3xck9KtZGCufGmcwiLQRzeHF7vJUKrLD5RTkNi23ydvWZgPjtx -Q+DTT1Zcn7BrQFY6FgnRoUVIxwtdw1bMY/89rsFgS5wwuMESd3Q2RYgb7EOFOpnu -w6da7WakWf4IhnF5nsNYGDVaIHzpiqCl+uTbf1epCjrOlIzkZ3Z3Yk5CM/TiFzPk -z2lLz89cpD8U+NtCsfagWWfjd2U3jDapgH+7nQnCEWpROtzaKHG6lA3pXdix5zG8 -eRc6/0IbUSWvfjKxLLPfNeCS2pCL3IeEI5nothEEYdQH6szpLog79xB9dVnJyKJb -VfxXnseoYqVrRz2VVbUI5Blwm6B40E3eGVfUQWiux54DspyVMMk41Mx7QJ3iynIa -1N4ZAqVMAEruyXTRTxc9XW0tYhDMA/1GYvz0EmFpm8LzTHA6sFVtPm/ZlNCX6P1X -zJwrv7DSQKD6GGlBQUX+OeEJ8tTkkf8QTJSPUdh8P8YxDFS5EOGAvhhpMBYD42kQ -pqXjEC+XcycTvGI7impgv9PDY1RCC1zkBjKPa120rNhv/hkVk/YhuGoajoHyy4h7 -ZQopdcMtpN2dgmhEegny9JCSwxfQmQ0zK0g7m6SHiKMwjwARAQABiQQ+BBgBCAAJ -BQJYrdoqAhsCAikJEI2BgDwOv82IwV0gBBkBCAAGBQJYrdoqAAoJEH6gqcPyc/zY -1WAP/2wJ+R0gE6qsce3rjaIz58PJmc8goKrir5hnElWhPgbq7cYIsW5qiFyLhkdp -YcMmhD9mRiPpQn6Ya2w3e3B8zfIVKipbMBnke/ytZ9M7qHmDCcjoiSmwEXN3wKYI -mD9VHONsl/CG1rU9Isw1jtB5g1YxuBA7M/m36XN6x2u+NtNMDB9P56yc4gfsZVES -KA9v+yY2/l45L8d/WUkUi0YXomn6hyBGI7JrBLq0CX37GEYP6O9rrKipfz73XfO7 -JIGzOKZlljb/D9RX/g7nRbCn+3EtH7xnk+TK/50euEKw8SMUg147sJTcpQmv6UzZ -cM4JgL0HbHVCojV4C/plELwMddALOFeYQzTif6sMRPf+3DSj8frbInjChC3yOLy0 -6br92KFom17EIj2CAcoeq7UPhi2oouYBwPxh5ytdehJkoo+sN7RIWua6P2WSmon5 -U888cSylXC0+ADFdgLX9K2zrDVYUG1vo8CX0vzxFBaHwN6Px26fhIT1/hYUHQR1z -VfNDcyQmXqkOnZvvoMfz/Q0s9BhFJ/zU6AgQbIZE/hm1spsfgvtsD1frZfygXJ9f -irP+MSAI80xHSf91qSRZOj4Pl3ZJNbq4yYxv0b1pkMqeGdjdCYhLU+LZ4wbQmpCk -SVe2prlLureigXtmZfkqevRz7FrIZiu9ky8wnCAPwC7/zmS18rgP/17bOtL4/iIz -QhxAAoAMWVrGyJivSkjhSGx1uCojsWfsTAm11P7jsruIL61ZzMUVE2aM3Pmj5G+W -9AcZ58Em+1WsVnAXdUR//bMmhyr8wL/G1YO1V3JEJTRdxsSxdYa4deGBBY/Adpsw -24jxhOJR+lsJpqIUeb999+R8euDhRHG9eFO7DRu6weatUJ6suupoDTRWtr/4yGqe -dKxV3qQhNLSnaAzqW/1nA3iUB4k7kCaKZxhdhDbClf9P37qaRW467BLCVO/coL3y -Vm50dwdrNtKpMBh3ZpbB1uJvgi9mXtyBOMJ3v8RZeDzFiG8HdCtg9RvIt/AIFoHR -H3S+U79NT6i0KPzLImDfs8T7RlpyuMc4Ufs8ggyg9v3Ae6cN3eQyxcK3w0cbBwsh -/nQNfsA6uu+9H7NhbehBMhYnpNZyrHzCmzyXkauwRAqoCbGCNykTRwsur9gS41TQ -M8ssD1jFheOJf3hODnkKU+HKjvMROl1DK7zdmLdNzA1cvtZH/nCC9KPj1z8QC47S -xx+dTZSx4ONAhwbS/LN3PoKtn8LPjY9NP9uDWI+TWYquS2U+KHDrBDlsgozDbs/O -jCxcpDzNmXpWQHEtHU7649OXHP7UeNST1mCUCH5qdank0V1iejF6/CfTFU4MfcrG -YT90qFF93M3v01BbxP+EIY2/9tiIPbrd -=0YYh ------END PGP PUBLIC KEY BLOCK----- diff --git a/stage9-docker/00-prepare/files/docker.list b/stage9-docker/00-prepare/files/docker.list deleted file mode 100644 index 3f8326f..0000000 --- a/stage9-docker/00-prepare/files/docker.list +++ /dev/null @@ -1 +0,0 @@ -deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable \ No newline at end of file diff --git a/stage9-docker/01-install/00-packages b/stage9-docker/01-install/00-packages deleted file mode 100644 index ed81c0e..0000000 --- a/stage9-docker/01-install/00-packages +++ /dev/null @@ -1,5 +0,0 @@ -docker-ce -docker-ce-cli -containerd.io -docker-buildx-plugin -docker-compose-plugin diff --git a/stage9-docker/01-install/01-run-chroot.sh b/stage9-docker/01-install/01-run-chroot.sh deleted file mode 100755 index 73b67e0..0000000 --- a/stage9-docker/01-install/01-run-chroot.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e -# AryaOS 01-run-chroot.sh -# -# Copyright Sensors & Signals LLC https://www.snstac.com/ -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -usermod -aG docker pi -usermod -aG docker node-red \ No newline at end of file diff --git a/stage9-docker/prerun.sh b/stage9-docker/prerun.sh deleted file mode 100755 index 9acd13c..0000000 --- a/stage9-docker/prerun.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -if [ ! -d "${ROOTFS_DIR}" ]; then - copy_previous -fi