mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
Merge pull request #3167 from holta/remoteit-disable
Stop & Disable any remoteit@* services (via Ansible or iiab-remoteit-off)
This commit is contained in:
commit
4007612c2f
2 changed files with 22 additions and 14 deletions
|
@ -24,15 +24,22 @@
|
|||
- schannel
|
||||
when: not remoteit_enabled
|
||||
|
||||
- name: Identify remoteit "Remote tcp connection service" unit file name, including uuid, e.g. remoteit@80:00:01:7F:7E:00:56:36.service
|
||||
shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@
|
||||
register: remoteit_service
|
||||
- name: Stop & Disable any remoteit@* services found in /etc/systemd/system/multi-user.target.wants/ e.g. remoteit@80:00:01:7F:7E:00:56:36.service
|
||||
shell: |
|
||||
systemctl stop $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*)
|
||||
systemctl disable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*)
|
||||
ignore_errors: yes
|
||||
when: not remoteit_enabled
|
||||
|
||||
- name: "Disable & Stop the actual service: {{ remoteit_service.stdout }}"
|
||||
systemd:
|
||||
name: "{{ remoteit_service.stdout }}"
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: not remoteit_enabled and remoteit_service.stdout != ""
|
||||
ignore_errors: yes
|
||||
# - name: Identify remoteit "Remote tcp connection service" unit file name, including uuid, e.g. remoteit@80:00:01:7F:7E:00:56:36.service
|
||||
# shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@
|
||||
# register: remoteit_service
|
||||
# ignore_errors: yes
|
||||
|
||||
# - name: "Disable & Stop the actual service: {{ remoteit_service.stdout }}"
|
||||
# systemd:
|
||||
# name: "{{ remoteit_service.stdout }}"
|
||||
# enabled: no
|
||||
# state: stopped
|
||||
# when: not remoteit_enabled and remoteit_service.stdout != ""
|
||||
# ignore_errors: yes
|
||||
|
|
|
@ -26,7 +26,8 @@ systemctl stop schannel
|
|||
systemctl disable schannel
|
||||
|
||||
# "Remote tcp connection service"
|
||||
systemctl stop $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@) || true
|
||||
systemctl disable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@) || true
|
||||
# Its systemd service name (e.g. remoteit@80:00:01:7F:7E:00:56:36.service)
|
||||
# changes when a new claim code is generated!
|
||||
systemctl stop $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*) || true
|
||||
systemctl disable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*) || true
|
||||
# FYI these systemd service names e.g. remoteit@80:00:01:7F:7E:00:56:36.service
|
||||
# change, and arise when a new claim code is generated, when the IIAB device is
|
||||
# registed, etc. 2022-04-05 Example: https://github.com/iiab/iiab/issues/3166
|
||||
|
|
Loading…
Reference in a new issue