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

Easy command /usr/bin/iiab-remoteit-off + explanations

This commit is contained in:
root 2022-04-04 00:04:19 -04:00
parent dd3bf7381a
commit bd2ff84ccb
5 changed files with 43 additions and 14 deletions

View file

@ -85,16 +85,9 @@ Prerequisite: Find an IIAB with `remoteit_installed: True` in `/etc/iiab/iiab_st
### How to I disable remote.it on my IIAB?
1. Run `sudo nano /etc/iiab/local_vars.yml` to set `remoteit_enabled: False`
1. Run `iiab-remoteit-off`
2. Then run:
```
cd /opt/iiab/iiab
sudo ./runrole remoteit
```
3. If want to completely remove the remote.it software and its settings, also run:
2. If want to completely remove all remote.it software and its settings, also run:
```
sudo apt purge "remoteit*"

View file

@ -1,4 +1,4 @@
- name: Enable & Restart remote.it service connectd, which exits after spawning 2 services/daemons below
- name: Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below
systemd:
name: connectd
daemon_reload: yes
@ -6,7 +6,7 @@
state: restarted
when: remoteit_enabled
- name: Enable remote.it daemon schannel ("Remote tcp command service") -- try to avoid contention with connectd also spawning it above!
- 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
@ -29,7 +29,7 @@
register: remoteit_service
ignore_errors: yes
- name: "Disable & Stop remoteit service: {{ remoteit_service.stdout }}"
- name: "Disable & Stop the actual service: {{ remoteit_service.stdout }}"
systemd:
name: "{{ remoteit_service.stdout }}"
enabled: no

View file

@ -36,12 +36,18 @@
shell: curl -L https://downloads.remote.it/remoteit/install_agent.sh | sh
- name: "Install /usr/bin/iiab-remoteit from template -- so IIAB operators can quickly generate a new remote.it claim code (in /etc/remoteit/config.json) AND enable remoteit's 3 systemd services -- optionally downloading + installing the very latest Device Package (like the 2 steps above)"
- name: "Install /usr/bin/iiab-remoteit from template -- so IIAB operators can quickly enable remote.it AND generate a new remote.it claim code (in /etc/remoteit/config.json) -- optionally downloading + installing the very latest Device Package (like the 2 steps above)"
template:
src: iiab-remoteit
dest: /usr/bin
mode: 0755
- name: "Install /usr/bin/iiab-remoteit-off from template -- so IIAB operators can quickly disable remote.it services on this IIAB"
template:
src: iiab-remoteit-off
dest: /usr/bin
mode: 0755
- name: Fail if architecture remoteit_cli_suffix == "unknown"
fail:

View file

@ -1,6 +1,7 @@
#!/bin/bash -e
# Run 'sudo iiab-remoteit' to (re)install & enable remote.it -- GENERAL TIPS:
# Run 'sudo iiab-remoteit' to enable remote.it AND get a new claim code. Also
# lets you download+install the latest Device Package to IIAB. GENERAL TIPS:
# http://FAQ.IIAB.IO -> "How can I remotely manage my Internet-in-a-Box?"
# 'remoteit' Device Package AND /usr/bin/remoteit CLI already installed by:

View file

@ -0,0 +1,29 @@
#!/bin/bash -xe
# Run 'sudo iiab-remoteit-off' to disable remote.it on this IIAB. GENERAL TIPS:
# http://FAQ.IIAB.IO -> "How can I remotely manage my Internet-in-a-Box?"
# GUIDE: https://github.com/iiab/iiab/blob/master/roles/remoteit/README.md
# FYI 'remoteit' Device Package AND /usr/bin/remoteit CLI are installed by:
# https://github.com/iiab/iiab/blob/master/roles/remoteit/tasks/install.yml
if grep -q '^remoteit_enabled:' /etc/iiab/local_vars.yml; then
sed -i "s/^remoteit_enabled:.*/remoteit_enabled: False/" /etc/iiab/local_vars.yml
else
echo "remoteit_enabled: False" >> /etc/iiab/local_vars.yml
fi
# remote.it "parent" service
systemctl stop connectd
systemctl disable connectd
# "Remote tcp command service"
systemctl stop schannel
systemctl disable schannel
# "Remote tcp connection service"
systemctl stop $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@)
systemctl disable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@)
# Its systemd service name (e.g. remoteit@80:00:01:7F:7E:00:56:36.service)
# changes when a new claim code is generated!