1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

remoteit/tasks/enable-or-disable.yml: Use /usr/share/remoteit/refresh.sh not connected

This commit is contained in:
A Holt 2022-10-09 17:09:23 -04:00 committed by GitHub
parent 865d2434eb
commit 617c4436a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,40 +22,43 @@
path: /etc/remoteit/registration path: /etc/remoteit/registration
register: remoteit_reg register: remoteit_reg
- name: Remove empty file /etc/remoteit/registration if remoteit_enabled - name: Remove empty file /etc/remoteit/registration if remoteit_enabled, so claim code can be generated
file: file:
path: /etc/remoteit/registration path: /etc/remoteit/registration
state: absent state: absent
when: remoteit_enabled and remoteit_reg.stat.exists and remoteit_reg.stat.size == 0 when: remoteit_enabled and remoteit_reg.stat.exists and remoteit_reg.stat.size == 0
# 2022-04-07 FYI: connectd (below) never deletes /etc/remoteit/registration # 2022-10-09: refresh.sh is equivalent to their old connectd "parent" systemd
# service, that they removed from 4.15.2 device packages on 2022-09-07.
# (Either way, the job below never deletes /etc/remoteit/registration)
- name: Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below - name: 'Run /usr/share/remoteit/refresh.sh to put a claim code in /etc/remoteit/config.json (if you don't already have a license key in /etc/remoteit/registration) -- FYI this spawns 2 "child" services/daemons: schannel & e.g. remoteit@80:00:01:7F:7E:00:56:36.service'
systemd: command: /usr/share/remoteit/refresh.sh
name: connectd
daemon_reload: yes
enabled: yes
state: restarted
when: remoteit_enabled when: remoteit_enabled
- name: Enable remote.it daemon schannel ("Remote tcp command service") -- try to avoid contention with connectd which auto-spawns it as nec (just above) # - name: Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below
# systemd:
# name: connectd
# daemon_reload: yes
# enabled: yes
# state: restarted
# when: remoteit_enabled
# 2022-10-09: refresh.sh (above) now takes care of this too
# - name: Enable remote.it daemon schannel ("Remote tcp command service") -- try to avoid contention with connectd which auto-spawns it as nec (just above)
# systemd:
# name: schannel
# enabled: yes
# state: started
# when: remoteit_enabled
- name: Disable & Stop remote.it service schannel
systemd: systemd:
name: schannel name: schannel
enabled: yes
state: started
when: remoteit_enabled
- name: Disable & Stop remote.it services {connectd, schannel}
systemd:
name: "{{ item }}"
enabled: no enabled: no
state: stopped state: stopped
with_items:
- connectd
- schannel
ignore_errors: yes
when: not remoteit_enabled when: not remoteit_enabled
- name: Stop & Disable "Remote tcp connection services" remoteit@* found in /etc/systemd/system/multi-user.target.wants/ e.g. remoteit@80:00:01:7F:7E:00:56:36.service - name: Stop & Disable "Remote tcp connection services" remoteit@* found in /etc/systemd/system/multi-user.target.wants/ e.g. remoteit@80:00:01:7F:7E:00:56:36.service