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-DDNS | Manage domains for your dynamic IP #4229

Merged
merged 30 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ shopt -s extglob
aSOFTWARE_NAME7_1[188]='Go'
# shellcheck disable=SC2034
aSOFTWARE_NAME7_1[189]='VSCodium'
unset -v 'aSOFTWARE_NAME7_1[67]' # No-IP: Replaced with DietPi-DDNS

# $1 = File name
Process_File()
Expand Down
8 changes: 8 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,13 @@ fi
# v7.1: Mark now dedicated Go as installed if OpenBazaar is
[[ -d '/usr/local/go' ]] && ! grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[188\]=2' /boot/dietpi/.installed && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[58\]=2' /boot/dietpi/.installed && G_CONFIG_INJECT 'aSOFTWARE_INSTALL_STATE\[188\]=' 'aSOFTWARE_INSTALL_STATE[188]=2' /boot/dietpi/.installed

# v7.1: Interactively inform user about possible No-IP => DietPi-DDNS migration
[[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[67)\]=2' /boot/dietpi/.installed && G_WHIP_MSG '[ INFO ] No-IP client installation found
\nThe No-IP client install option has been replaced by our new DietPi-DDNS tool. The No-IP client remains functional on your system but we recommend a migration to our new tool.
\nSimply run "dietpi-ddns" from console, select "No-IP" as provider, enter domain and credentials, then select "Apply". The old No-IP client and service will be removed automatically as last step, once a final DDNS update test succeeded.'

# v7.1: Remove obsolete DietPi-NordVPN and No-IP install states
[[ -f '/boot/dietpi/.installed' ]] && grep -qE '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[(67|171)\]=' /boot/dietpi/.installed && G_EXEC sed -Ei '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[(67|171)\]=/d' /boot/dietpi/.installed

exit 0
}
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ Changes:
- DietPi-Software | Koel: On fresh installs and reinstalls, the listening port has been changed from 8000 to 8003 to avoid conflicts with IceCast. Additionally the install process has been simplified and dependencies reduces, since after Koel v5.0.0 pre-compiled frontend binaries are available. This also allows a completely unattended install now. As little security hardening, the Koel MariaDB database password has been changed to a long random character string and the config files permission mode has been changed to 600 to permit read access to the Koel service user only. Finally as little performance enhancement, Koel now connects via UNIX socket to MariaDB instead of view TCP connection, which allows to disable TCP listening in MariaDB.
- DietPi-Software | YaCy: New installs and reinstalls will now have the latest version detected and downloaded automatically. This enables an easy update method by simply reinstalling YaCy via "dietpi-software reinstall 133", independent of the DietPi version.

New Scripts:
- DietPi-DDNS | This new tool has been added, which allows you to manage domains for your dynamic IP address. Select a Dynamic DNS (DDNS) provider or add a custom API URL, to have your DDNS entry updated regularly, via cURL and Cron job. Among others, it supports No-IP and replaces the No-IP client that DietPi supported until now.

New Software:
- DietPi-Software | IPFS Node: The InterPlanetary File System peer-to-peer hypermedia protocol node is now available for install with the software ID 186. Many thanks to @ravenclaw900 for implementing this software option: https://github.com/MichaIng/DietPi/issues/4232
- DietPi-Software | CUPS: The common UNIX printing system is now available as optimised install option with the software ID 187, including a web interface to manage and share local and network printers across your LAN.
- DietPi-Software | Go: Being previously tied into the OpenBazaar install, Go has now become a dedicated install option with the software ID 188. This includes the runtime system, package installer and compiler tool chain, as found at https://golang.org/dl/.
- DietPi-Software | VSCodium: As alternative to MS VSCode without MS branding, telemetry and licensing, the VSCodium code editor, with support for various programming languages, including Java, JavaScript, Go, Node.js, Python and C++, has been added as software install option to DietPi.

Removed Software:
- DietPi-Software | DietPi-NordVPN: As part of the major rework (see changes above), the dedicated install option has been removed. The script is available OOTB and will download, install or remove parts depending on your provider choice and menu selections.
- DietPi-Software | No-IP: As result of the new DietPi-DDNS tool (see new scripts above), the dedicated install option has been removed. DietPi-DDNS is always available and does not require any additional download or install of external files.

Fixes:
- DietPi-Config/DietPi-PREP | Resolved an issue on Debian Bullseye, when toggling serial consoles, where /etc/securetty is attempted to be altered even that it is not used and does not exist anymore since Debian Bullseye. Many thanks to @NastyDesertFox for reporting this issue: https://github.com/MichaIng/DietPi/issues/4205
- DietPi-Config | Resolved an issue on Sparky SBC, where selecting the generic USB DAC sound card option failed, due to invalid amixer calls. Many thanks to @Balmoral86 for reporting this issue: https://github.com/MichaIng/DietPi/issues/4249
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ Links to hardware and software manufacturers, sources and build instructions use
- [vsftpd](https://security.appspot.com/vsftpd.html)
- [Samba](https://wiki.samba.org/index.php/Using_Git_for_Samba_Development)
- [NFS](http://linux-nfs.org/wiki/index.php/Main_Page)
- [No-IP Client Binary](https://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client/)
- [Dropbear](https://github.com/mkj/dropbear)
- [OpenSSH](https://github.com/openssh/openssh-portable)
- [OpenVPN](https://github.com/OpenVPN)
Expand Down
40 changes: 3 additions & 37 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -4177,19 +4177,6 @@ Additional benchmarks:

TARGETMENUID=0

# No-IP Client
local noip_installed=0
local noip_menutext='[Not Installed] Install No-IP now'
if command -v noip2 > /dev/null && [[ -f '/etc/systemd/system/noip2.service' ]]; then

noip_installed=1
noip_menutext='[Offline] Enter/Setup No-IP details'

# Check if No-IP is running (indicates login details are valid)
pgrep 'noip2' > /dev/null && noip_menutext='[Online] Change No-IP details'

fi

# APT mirror
local apt_mirror_current=$(grep -m1 '^[[:blank:]]*deb[[:blank:]]' /etc/apt/sources.list | mawk '{print $2}')
[[ $apt_mirror_current ]] || apt_mirror_current='Unknown, no string from scrape'
Expand Down Expand Up @@ -4226,8 +4213,8 @@ Additional benchmarks:
'G_CHECK_URL Timeout' ": [$check_url_timeout Seconds]"
'G_CHECK_URL Attempts' ": [$check_url_attempts Tries]"
'' '●─ Additional Options '
'Network Drives' ': Mount/control networked storage'
'No-IP' ": $noip_menutext"
'Network Drives' ': Mount/control network storage'
'Dynamic DNS' ': Manage domains for your dynamic IP'

)

Expand Down Expand Up @@ -4394,28 +4381,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s

;;

'No-IP')

# Installed?
if (( ! $noip_installed )); then

G_WHIP_YESNO 'No-IP Client is not installed, would you like to install it now?\n
- No-IP will allow you to use a fixed web address, regardless of your internet IP.
Eg: MySuperDooperWebsite.noip2.biz would always point to this device!' && /boot/dietpi/dietpi-software install 67

else

G_TERM_CLEAR
G_EXEC systemctl stop noip2
# Failsafe: Directory required for "noip2 -C" to create the config file there
G_EXEC mkdir -p /usr/local/etc
noip2 -C
read -rp 'Press any key to continue...'
G_EXEC systemctl restart noip2

fi

;;
'Dynamic DNS') /boot/dietpi/dietpi-ddns;;

esac

Expand Down
Loading