Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Remot3.it: Migrate away from deprecated installer #5790

Merged
merged 4 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ v8.10
(2022-10-22)

Enhancements:
- DietPi-Software | Remote.It: Update the product name (Remot3.it -> Remote.It), information and package to the latest and remove the old information "Weaved".

Bug fixes:
- DietPi-Drive_Manager | Resolved an issue where it was not possible to disable the swap file with less than 2 GiB available free space on that drive. The check was meant to prevent the creation of a swap file with limited free space, while disabling/removing a swap file should of course always be possible. Furthermore the 2 GiB free space requirement has been removed completely, which has no point on non-system drives and is too strict even on system drives which, depending on the setup, can run fine with much less free space. Many thanks to @symbios24 for reporting this issue: https://github.com/MichaIng/DietPi/issues/5749#issuecomment-1257169750
Expand Down
42 changes: 27 additions & 15 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ Available commands:
# Remote Access
#--------------------------------------------------------------------------------
software_id=68
aSOFTWARE_NAME[$software_id]='Remot3.it'
aSOFTWARE_DESC[$software_id]='(aka Weaved) access your device over the internet'
aSOFTWARE_NAME[$software_id]='Remote.It'
aSOFTWARE_DESC[$software_id]='Provides secure connections to your networked devices'
aSOFTWARE_CATX[$software_id]=9
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/remote_desktop/#remot3it'
#------------------
Expand Down Expand Up @@ -6800,28 +6800,45 @@ _EOF_
Download_Test_Media
fi

software_id=68 # Remot3.it
software_id=68 # Remote.It
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing

G_EXEC export R3_PLATFORM_CODE="1072"
MichaIng marked this conversation as resolved.
Show resolved Hide resolved

# ARMv6/7
local arch='armhf'
local url='https://downloads.remote.it/remoteit/latest/remoteit.armhf.deb'

# ARMv8
if (( $G_HW_ARCH == 3 )); then

arch='arm64'
local url='https://downloads.remote.it/remoteit/latest/remoteit.arm64.deb'

# x86_64
elif (( $G_HW_ARCH == 10 )); then

arch='amd64'
local url='https://downloads.remote.it/remoteit/latest/remoteit.amd64.deb'

fi

local fallback_url="https://github.com/remoteit/installer/releases/download/v2.6.39/connectd_2.6.39_$arch.deb"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/remoteit/installer/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/connectd_[^\"\/]*_$arch\.deb\"/{print \$4}")"
Download_Install "$url"

MichaIng marked this conversation as resolved.
Show resolved Hide resolved
G_WHIP_MSG "Installation of Remote.It is complete.
\n\nThe final step is to register your claim code with your desktop application.
See the manual below for instructions on how to do this.
\nhttps://docs.remote.it/software/device-package/installation#3.-claim-and-register-the-device
\n\nYour claim code: $(grep "claim" /etc/remoteit/config.json | awk -F '"' '{print $4}')
\n\nThen this DietPi device will be online as your Remote.It device and you can start using it."

if dpkg-query -s 'connectd' &> /dev/null || dpkg-query -s 'weavedconnectd' &> /dev/null
then
G_WHIP_BUTTON_CANCEL_TEXT='Skip' G_WHIP_YESNO '[WARNING] Legacy Remote.It package detected
\nOne of the legacy Remote.It packages "connectd" or "weavedconnectd" is installed on your system. These have been superseded by the new "remoteit" package.
\nDo you want the legacy packages to be uninstalled now?
\nNB: You can do this any time later, e.g. after connections with the new package have been set up:
G_AGP connectd weavedconnectd' && G_AGP connectd weavedconnectd
fi

fi

Expand Down Expand Up @@ -14317,11 +14334,11 @@ If no WireGuard (auto)start is included, but you require it, please do the follo

fi

software_id=68 # Remot3.it
software_id=68 # Remote.It
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling
G_AGP connectd weavedconnectd # pre-v6.22
G_AGP remoteit connectd weavedconnectd # connectd: pre-v8.10, weavedconnectd: pre-v6.22

fi

Expand Down Expand Up @@ -16100,11 +16117,6 @@ _EOF_
fi

# Interactive software post-configuration
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
# - Remot3.it
(( ${aSOFTWARE_INSTALL_STATE[68]} == 1 )) && G_WHIP_BUTTON_CANCEL_TEXT='Later' G_WHIP_YESNO 'Do you want to configure Remot3.it now?
This requires an account at: https://remote.it/
\nYou can do the setup any time later by calling "connectd_installer" from console.
\nRead more: https://dietpi.com/docs/software/remote_desktop/#remot3it' && connectd_installer

# Install finished, set all installed software to state 2 (installed)
for i in "${!aSOFTWARE_NAME[@]}"
Expand Down