From 9f547d2b85e43cbe017a98b7309572133dff7b8e Mon Sep 17 00:00:00 2001 From: Michael Lynch Date: Fri, 1 Sep 2023 17:28:48 -0400 Subject: [PATCH] Delete Ansible from installation process (#1604) Resolves #1598 Resolves #1596 This reimplements the `load-tc358743-edid` service without Ansible, which completes our process of eliminating Ansible from TinyPilot's install process. The last real piece was moving the installation of the `load-tc358743-edid` from Ansible to Debian. The rest is just deleting remaining Ansible files and stray references to Ansible. Note that in deleting the Ansible environment setup, we delete `apt-get update --allow-releaseinfo-change-suite` which we added in https://github.com/tiny-pilot/tinypilot/issues/764. I don't think we need this command anymore, but we can bring it back in the future if we find that we need it. ## Manual tests I ran the following manual tests: * Verified keyboard and mouse still worked * Verified that I could still adjust video settings * Verified that audio still worked in H.264 (on Voyager systems) For the following scenarios: - [x] Install on a bare Raspbian system - [x] Install on a bare Raspbian system with TC358743 enabled - [x] Install a Pro Voyager image - [x] Install a Pro Hobbyist image - [x] Install a bundle on a Pro 2.6.0 Voyager image to simulate an update ## Peer testing To test this bundle run: ```bash curl \ --silent \ --show-error \ --location \ https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/scripts/install-bundle | \ sudo bash -s -- \ https://output.circle-artifacts.com/output/job/a5f0e73a-fc7b-4025-b6ce-c8f05c4be707/artifacts/0/bundler/dist/tinypilot-community-20230901T1513Z-1.9.0-109+51dc0af.tgz && \ sudo reboot ``` Review
on CodeApprove --------- Co-authored-by: David Brown --- .circleci/continue_config.yml | 30 ---------- README.md | 1 - ansible-role-ustreamer/.gitignore | 1 - ansible-role-ustreamer/.yamllint | 33 ----------- ansible-role-ustreamer/LICENSE | 21 ------- ansible-role-ustreamer/README.md | 39 ------------ ansible-role-ustreamer/handlers/main.yml | 22 ------- ansible-role-ustreamer/meta/main.yml | 20 ------- .../molecule/default/converge.yml | 20 ------- .../molecule/default/molecule.yml | 33 ----------- .../molecule/requirements.txt | 59 ------------------- ansible-role-ustreamer/tasks/main.yml | 31 ---------- .../tasks/provision_tc358743.yml | 12 ---- app/license_notice.py | 37 ------------ bundler/.gitignore | 1 - bundler/README.md | 2 - bundler/bundle/ansible.cfg | 4 -- bundler/bundle/install | 37 ------------ bundler/bundle/install.yml | 6 -- bundler/bundle/requirements.txt | 16 ----- bundler/create-bundle | 12 ---- bundler/verify-bundle | 6 -- debian-pkg/debian/rules | 1 + .../tinypilot.load-tc358743-edid.service | 0 debian-pkg/debian/tinypilot.postinst | 3 + .../tinypilot/templates/tinypilot.conf.j2 | 2 +- 26 files changed, 5 insertions(+), 444 deletions(-) delete mode 100644 ansible-role-ustreamer/.gitignore delete mode 100644 ansible-role-ustreamer/.yamllint delete mode 100644 ansible-role-ustreamer/LICENSE delete mode 100644 ansible-role-ustreamer/README.md delete mode 100644 ansible-role-ustreamer/handlers/main.yml delete mode 100644 ansible-role-ustreamer/meta/main.yml delete mode 100644 ansible-role-ustreamer/molecule/default/converge.yml delete mode 100644 ansible-role-ustreamer/molecule/default/molecule.yml delete mode 100644 ansible-role-ustreamer/molecule/requirements.txt delete mode 100644 ansible-role-ustreamer/tasks/main.yml delete mode 100644 ansible-role-ustreamer/tasks/provision_tc358743.yml delete mode 100644 bundler/bundle/ansible.cfg delete mode 100644 bundler/bundle/install.yml delete mode 100644 bundler/bundle/requirements.txt rename ansible-role-ustreamer/templates/load-tc358743-edid.systemd.j2 => debian-pkg/debian/tinypilot.load-tc358743-edid.service (100%) diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index eda574da6..92704f5b0 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -181,33 +181,6 @@ jobs: --fail-on warning,error \ "${file}" done < <(ls *.deb) - build_ansible_role: - machine: - image: ubuntu-2004:202010-01 - resource_class: large - working_directory: ~/project/ansible-role-ustreamer - steps: - - unless: - condition: << pipeline.parameters.ansible_role_changed >> - steps: - - run: - name: Skipping job because files weren't changed - command: circleci-agent step halt - - checkout: - path: ~/project - - run: - name: Create virtual environment - command: python3 -m venv venv - - run: - name: Test role with molecule - command: | - . venv/bin/activate && \ - pip install --upgrade pip && \ - pip install wheel==0.34.2 && \ - pip install -r molecule/requirements.txt && \ - ansible --version && \ - molecule --version && \ - molecule test build_bundle: docker: - image: cimg/python:3.9.17 @@ -301,9 +274,6 @@ workflows: - lint_debian_package: requires: - build_debian_package - - build_ansible_role: - requires: - - build_debian_package - build_bundle: requires: - build_debian_package diff --git a/README.md b/README.md index 5e7a84467..f1f89e44f 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,6 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file. ## Other installation options - [Advanced installation options](https://github.com/tiny-pilot/tinypilot/wiki/Installation-Options#advanced-installation) -- [Remote installation via Ansible](https://github.com/tiny-pilot/tinypilot/wiki/Installation-Options#remote-installation) ## Updates diff --git a/ansible-role-ustreamer/.gitignore b/ansible-role-ustreamer/.gitignore deleted file mode 100644 index 5ceb3864c..000000000 --- a/ansible-role-ustreamer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -venv diff --git a/ansible-role-ustreamer/.yamllint b/ansible-role-ustreamer/.yamllint deleted file mode 100644 index 882767605..000000000 --- a/ansible-role-ustreamer/.yamllint +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - colons: - max-spaces-after: -1 - level: error - commas: - max-spaces-after: -1 - level: error - comments: disable - comments-indentation: disable - document-start: disable - empty-lines: - max: 3 - level: error - hyphens: - level: error - indentation: disable - key-duplicates: enable - line-length: disable - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: disable - truthy: disable diff --git a/ansible-role-ustreamer/LICENSE b/ansible-role-ustreamer/LICENSE deleted file mode 100644 index 8eef33ae8..000000000 --- a/ansible-role-ustreamer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Michael Lynch - -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. diff --git a/ansible-role-ustreamer/README.md b/ansible-role-ustreamer/README.md deleted file mode 100644 index bc3be277c..000000000 --- a/ansible-role-ustreamer/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Ansible Role: µStreamer - -[![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE) - -Ansible role for [µStreamer](https://github.com/tiny-pilot/ustreamer). - -Installs µStreamer via a Debian package and enables it as a systemd service. - -## Role Variables - -For a full list of options, see [defaults/main.yml](defaults/main.yml). - -## Dependencies - -None - -## Example Playbook - -#### `example.yml` - -```yaml -- hosts: all - roles: - - role: ansible-role-ustreamer -``` - -### Running Example Playbook - -```bash -ansible-playbook example.yml -``` - -## License - -MIT - -## Author Information - -This role was created in 2020 by [TinyPilot](https://tinypilotkvm.com). diff --git a/ansible-role-ustreamer/handlers/main.yml b/ansible-role-ustreamer/handlers/main.yml deleted file mode 100644 index a4528deef..000000000 --- a/ansible-role-ustreamer/handlers/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: reload systemd config - systemd: - daemon_reload: yes - -- name: load TC358743 EDID file - service: - name: load-tc358743-edid - state: started - # If the TC358743 is not yet attached, for example, when pre-provisioning an - # image, this will fail, but we can ignore it. - ignore_errors: yes - -- name: configure TC358743 EDID loader to run at boot - systemd: - name: load-tc358743-edid - enabled: yes - -- name: restart Janus - service: - name: janus - state: restarted diff --git a/ansible-role-ustreamer/meta/main.yml b/ansible-role-ustreamer/meta/main.yml deleted file mode 100644 index 146b9ee35..000000000 --- a/ansible-role-ustreamer/meta/main.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -galaxy_info: - role_name: ustreamer - author: Michael Lynch - description: A lightweight, optimized video streaming service - license: MIT - - min_ansible_version: 2.8 - - platforms: - - name: Debian - versions: - - bullseye - - galaxy_tags: - - raspberrypi - - usb - - oss - -dependencies: [] diff --git a/ansible-role-ustreamer/molecule/default/converge.yml b/ansible-role-ustreamer/molecule/default/converge.yml deleted file mode 100644 index 95419f035..000000000 --- a/ansible-role-ustreamer/molecule/default/converge.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Converge - hosts: all - gather_facts: no - tasks: - - name: Update apt cache and install system dependencies - apt: - name: - # To accurately detect the OS of the target machine, we need to - # install the lsb-release package before Ansible gathers facts. This - # ensures that the ansible_lsb fact is defined. - # https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_conditionals.html#conditionals-based-on-ansible-facts - - lsb-release - update_cache: true - cache_valid_time: 600 - - name: Gather facts - setup: - - name: Include ansible-role-ustreamer - include_role: - name: ansible-role-ustreamer diff --git a/ansible-role-ustreamer/molecule/default/molecule.yml b/ansible-role-ustreamer/molecule/default/molecule.yml deleted file mode 100644 index f95d0ee12..000000000 --- a/ansible-role-ustreamer/molecule/default/molecule.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -dependency: - name: galaxy -driver: - name: docker -platforms: - - name: debian11 - image: geerlingguy/docker-debian11-ansible - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: true - pre_build_image: true -provisioner: - name: ansible - log: true - inventory: - hosts: - all: - vars: - ansible_user: root -verifier: - name: ansible -scenario: - name: default - test_sequence: - - lint - - destroy - - syntax - - create - - converge - - idempotence - - destroy diff --git a/ansible-role-ustreamer/molecule/requirements.txt b/ansible-role-ustreamer/molecule/requirements.txt deleted file mode 100644 index b7cc5b4d1..000000000 --- a/ansible-role-ustreamer/molecule/requirements.txt +++ /dev/null @@ -1,59 +0,0 @@ -# To update this file: -# -# 1. Delete the venv folder -# 2. Create a fresh venv folder with python3 -m venv venv -# 3. pip install the direct dependencies -# 4. Run pip freeze and save any indirect dependencies below -# 5. Remove dataclasses==0.8 and pkg_resources==0.0.0 - -# Direct dependencies - -ansible==2.10.7 -molecule==3.2.3 -molecule-docker==0.2.4 - -# Indirect dependencies - -ansible-base==2.10.17 -arrow==1.2.2 -bcrypt==3.2.2 -binaryornot==0.4.4 -Cerberus==1.3.4 -certifi==2022.12.7 -cffi==1.15.1 -chardet==5.0.0 -charset-normalizer==2.1.0 -click==7.1.2 -click-completion==0.5.2 -click-help-colors==0.9.1 -commonmark==0.9.1 -cookiecutter==2.1.1 -cryptography==39.0.1 -distro==1.7.0 -docker==5.0.3 -enrich==1.2.7 -idna==3.3 -Jinja2==3.1.2 -jinja2-time==0.2.0 -MarkupSafe==2.1.1 -packaging==21.3 -paramiko==2.11.0 -pathspec==0.9.0 -pluggy==0.13.1 -pycparser==2.21 -Pygments==2.12.0 -PyNaCl==1.5.0 -pyparsing==3.0.9 -python-dateutil==2.8.2 -python-slugify==6.1.2 -PyYAML==5.3.1 -requests==2.28.1 -rich==12.5.1 -selinux==0.2.1 -shellingham==1.5.0 -six==1.16.0 -subprocess-tee==0.3.5 -text-unidecode==1.3 -urllib3==1.26.11 -websocket-client==1.3.3 -yamllint==1.27.1 diff --git a/ansible-role-ustreamer/tasks/main.yml b/ansible-role-ustreamer/tasks/main.yml deleted file mode 100644 index 043087a83..000000000 --- a/ansible-role-ustreamer/tasks/main.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: check for a boot config file - stat: - path: /boot/config.txt - register: boot_config_result - -- name: save whether boot config file exists - set_fact: - boot_config_exists: "{{ boot_config_result.stat.exists }}" - -- name: check if TC358743 settings (HDMI to CSI, such as Voyager series) are enabled - # We could theoretically use the "lineinfile" module to check for the overlay, - # but we're moving away from Ansible, and grep makes the logic easier to read. - command: grep --silent '^dtoverlay=tc358743$' /boot/config.txt - register: tc358743_result - check_mode: no - ignore_errors: yes - changed_when: no - when: boot_config_exists | bool - -- name: save whether TC358743 settings are enabled - set_fact: - is_tc358743_enabled: "{{ boot_config_exists and tc358743_result.rc == 0 }}" - -- name: print whether TC35843 settings are enabled - debug: - var: is_tc358743_enabled - -- name: configure TC358743 HDMI capture chip - import_tasks: provision_tc358743.yml - when: is_tc358743_enabled | bool diff --git a/ansible-role-ustreamer/tasks/provision_tc358743.yml b/ansible-role-ustreamer/tasks/provision_tc358743.yml deleted file mode 100644 index f6b1c4f43..000000000 --- a/ansible-role-ustreamer/tasks/provision_tc358743.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: install TC358743 initializer service - template: - src: load-tc358743-edid.systemd.j2 - dest: /lib/systemd/system/load-tc358743-edid.service - owner: root - group: root - mode: "0644" - notify: - - reload systemd config - - load TC358743 EDID file - - configure TC358743 EDID loader to run at boot diff --git a/app/license_notice.py b/app/license_notice.py index 69e640c65..8e6109b55 100644 --- a/app/license_notice.py +++ b/app/license_notice.py @@ -187,43 +187,6 @@ class LicenseMetadata: './venv/lib/python3.*/site-packages/zipp-*.dist-info/LICENSE*', ), - # Ansible dependencies that are not covered above. They are not available - # permanently on the device because we only create ephemeral Ansible install - # environments. - LicenseMetadata( - name='Ansible', - homepage_url='https://www.ansible.com', - license_url= - 'https://raw.githubusercontent.com/ansible/ansible/v2.10.7/COPYING'), - LicenseMetadata( - name='cffi', - homepage_url='http://cffi.readthedocs.org/', - license_url='https://foss.heptapod.net/pypy/cffi/-/raw/v1.15.1/LICENSE' - ), - LicenseMetadata( - name='cryptography', - homepage_url='https://cryptography.io', - license_url= - 'https://raw.githubusercontent.com/pyca/cryptography/37.0.4/LICENSE.BSD' - ), - LicenseMetadata( - name='packaging', - homepage_url='https://github.com/pypa/packaging', - license_url= - 'https://raw.githubusercontent.com/pypa/packaging/21.3/LICENSE.BSD'), - LicenseMetadata( - name='pycparser', - homepage_url='https://github.com/eliben/pycparser', - license_url= - 'https://raw.githubusercontent.com/eliben/pycparser/release_v2.21/LICENSE' - ), - LicenseMetadata( - name='pyparsing', - homepage_url='https://github.com/pyparsing/pyparsing/', - license_url= - 'https://raw.githubusercontent.com/pyparsing/pyparsing/pyparsing_3.0.9/LICENSE' - ), - # Indirect dependencies through Janus. LicenseMetadata( name='libnice', diff --git a/bundler/.gitignore b/bundler/.gitignore index 255dcdc6a..0b15ab04d 100644 --- a/bundler/.gitignore +++ b/bundler/.gitignore @@ -1,6 +1,5 @@ # Dynamic dependencies from dist/ folder. /bundle/tinypilot -/bundle/roles /bundle/*.deb /bundle/yq diff --git a/bundler/README.md b/bundler/README.md index 91d6d3fab..44f2b5ae8 100644 --- a/bundler/README.md +++ b/bundler/README.md @@ -12,8 +12,6 @@ The [`create-bundle`](create-bundle) script generates the bundle from the [`bund - **The TinyPilot web service** - The root [`Dockerfile`](../Dockerfile) packs the TinyPilot web service as a Debian package from the source files. -- **Ansible role** - - [`ansible-role-ustreamer`](../ansible-role-ustreamer) is responsible for configuring uStreamer on the device. - **Metadata** - E.g., version/build information diff --git a/bundler/bundle/ansible.cfg b/bundler/bundle/ansible.cfg deleted file mode 100644 index 0820122fb..000000000 --- a/bundler/bundle/ansible.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[defaults] -remote_user = root -roles_path = ./roles -interpreter_python = /usr/bin/python3 diff --git a/bundler/bundle/install b/bundler/bundle/install index e482a39c8..c4ebee954 100755 --- a/bundler/bundle/install +++ b/bundler/bundle/install @@ -58,40 +58,3 @@ apt-get install -y \ # Install yq. mv yq /usr/bin/yq chmod 0755 /usr/bin/yq - -# Bootstrap environment for installation. -apt-get update --allow-releaseinfo-change-suite -apt-get install -y \ - git \ - libffi-dev \ - libssl-dev \ - python3-dev \ - python3-venv \ - lsb-release - -python3 -m venv venv -# shellcheck disable=SC1091 # Don’t follow sourced script. -. venv/bin/activate -# Ensure we're using a version of pip that can use binary wheels where available -# instead of building the packages locally. -pip install "pip>=21.3.1" -pip install -r requirements.txt - -# If there's an existing TinyPilot settings file, pass it to Ansible to override -# default vars. -readonly TINYPILOT_SETTINGS_FILE='/home/tinypilot/settings.yml' -EXTRA_PLAYBOOK_FLAGS=() -# Check that TinyPilot settings file exists and is non-empty. -if [[ -s "${TINYPILOT_SETTINGS_FILE}" ]]; then - EXTRA_PLAYBOOK_FLAGS+=('--extra-vars' "@${TINYPILOT_SETTINGS_FILE}") - - echo "Final install settings:" - cat "${TINYPILOT_SETTINGS_FILE}" -fi -readonly EXTRA_PLAYBOOK_FLAGS - -# Run Ansible. -ansible-playbook \ - --inventory localhost, \ - install.yml \ - "${EXTRA_PLAYBOOK_FLAGS[@]}" diff --git a/bundler/bundle/install.yml b/bundler/bundle/install.yml deleted file mode 100644 index f0fb91dcc..000000000 --- a/bundler/bundle/install.yml +++ /dev/null @@ -1,6 +0,0 @@ -- hosts: localhost - connection: local - become: true - become_method: sudo - roles: - - role: ansible-role-ustreamer diff --git a/bundler/bundle/requirements.txt b/bundler/bundle/requirements.txt deleted file mode 100644 index c633e19eb..000000000 --- a/bundler/bundle/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Minimal set of dependencies to bootstrap an Ansible virtualenv. -# When modifying dependencies, update the credit in /app/license_notice.py - -# Direct dependencies. -ansible==2.10.7 - -# Indirect dependencies. -ansible-base==2.10.17 -cffi==1.15.1 -cryptography==37.0.4 -Jinja2==3.1.2 -MarkupSafe==2.1.1 -packaging==21.3 -pycparser==2.21 -pyparsing==3.0.9 -PyYAML==6.0.1 diff --git a/bundler/create-bundle b/bundler/create-bundle index 62a3700b7..e2747c26f 100755 --- a/bundler/create-bundle +++ b/bundler/create-bundle @@ -24,9 +24,6 @@ cd ./bundler readonly BUNDLE_DIR='bundle' readonly OUTPUT_DIR='dist' -readonly ANSIBLE_ROLES_DIR="${BUNDLE_DIR}/roles" -readonly ANSIBLE_ROLE_USTREAMER_DIR="${ANSIBLE_ROLES_DIR}/ansible-role-ustreamer" - # Exclude the AMD64 package from the production bundle. rm -f "${BUNDLE_DIR}/tinypilot"*amd64.deb @@ -65,15 +62,6 @@ readonly TINYPILOT_VERSION readonly TINYPILOT_VARIANT='community' readonly BUNDLE_FILENAME="tinypilot-${TINYPILOT_VARIANT}-${TIMESTAMP}-${TINYPILOT_VERSION}.tgz" -# Clear Ansible roles from any previous bundle builds. -rm -rf "${ANSIBLE_ROLES_DIR}" -mkdir "${ANSIBLE_ROLES_DIR}" - -# Copy local Ansible roles. -cp -r \ - --no-target-directory \ - ../ansible-role-ustreamer "${ANSIBLE_ROLE_USTREAMER_DIR}" - # Download Janus Bullseye Backports Debian package. wget \ --directory-prefix="${BUNDLE_DIR}" \ diff --git a/bundler/verify-bundle b/bundler/verify-bundle index d19f88239..d9f2bea65 100755 --- a/bundler/verify-bundle +++ b/bundler/verify-bundle @@ -43,9 +43,3 @@ fi # List Debian package contents. dpkg --contents tinypilot*armhf.deb - -# Check that the Ansible role exists. -if [[ ! -d 'roles/ansible-role-ustreamer' ]]; then - >&2 echo 'Bundle is missing ansible-role-ustreamer' - exit 1 -fi diff --git a/debian-pkg/debian/rules b/debian-pkg/debian/rules index a1ebb78c7..5d5ae5165 100755 --- a/debian-pkg/debian/rules +++ b/debian-pkg/debian/rules @@ -13,6 +13,7 @@ export DEB_BUILD_OPTIONS=noddebs dh $@ --with python-virtualenv override_dh_installsystemd: + dh_installsystemd --name=load-tc358743-edid --no-start dh_installsystemd --name=tinypilot dh_installsystemd --name=tinypilot-updater --no-start --no-enable dh_installsystemd --name=usb-gadget --no-start diff --git a/ansible-role-ustreamer/templates/load-tc358743-edid.systemd.j2 b/debian-pkg/debian/tinypilot.load-tc358743-edid.service similarity index 100% rename from ansible-role-ustreamer/templates/load-tc358743-edid.systemd.j2 rename to debian-pkg/debian/tinypilot.load-tc358743-edid.service diff --git a/debian-pkg/debian/tinypilot.postinst b/debian-pkg/debian/tinypilot.postinst index 768d3c40f..eb4565fb1 100755 --- a/debian-pkg/debian/tinypilot.postinst +++ b/debian-pkg/debian/tinypilot.postinst @@ -215,4 +215,7 @@ cp \ /usr/share/tinypilot/janus.transport.websockets.jcfg \ /etc/janus/janus.transport.websockets.jcfg +# Restart Janus to pick up the new config files. +deb-systemd-invoke restart janus + #DEBHELPER# diff --git a/debian-pkg/usr/share/tinypilot/templates/tinypilot.conf.j2 b/debian-pkg/usr/share/tinypilot/templates/tinypilot.conf.j2 index 87106c18e..34fd5ce9a 100644 --- a/debian-pkg/usr/share/tinypilot/templates/tinypilot.conf.j2 +++ b/debian-pkg/usr/share/tinypilot/templates/tinypilot.conf.j2 @@ -6,7 +6,7 @@ upstream ustreamer { } upstream janus-ws { # The host and port must match the variables in - # ansible-role-ustreamer/templates/janus.transport.websockets.jcfg.j2 + # debian-pkg/usr/share/tinypilot/janus.transport.websockets.jcfg server 127.0.0.1:48002 fail_timeout=1s max_fails=600; }