nextcloudpi/bin/ncp-suggestions
Tobias Knöppler 1a210e9f12
Replace 'NextCloudPi' with 'NextcloudPi' in localization and code comments
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2024-08-06 14:34:30 +02:00

39 lines
1.1 KiB
Bash

#!/bin/bash
#
# NextcloudPi configuration suggestions
#
# Copyleft 2018 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# sudo ncp-suggestions "$( ncp-diag )"
#
# More at https://ownyourbits.com
#
OUT="$@"
source /usr/local/etc/library.sh
check_distro || \
echo -e "You are using an outdated distro release. You should upgrade to latest Debian/Raspbian"
is_active_app dnsmasq && \
grep -q "NAT loopback|no" <<<"$OUT" && \
echo -e "\nYou should enable dnsmasq to use your domain inside home"
grep -q "Certificates|none" <<<"$OUT" && \
echo -e "\nYou should run Lets Encrypt for trusted encrypted access"
grep -q "Port .*|closed" <<<"$OUT" && \
echo -e "\nYou should open your ports for Lets Encrypt and external access"
grep -q "USB devices|none" <<<"$OUT" || {
grep -q "data in SD|yes" <<<"$OUT" && \
echo -e "\nYou should use nc-datadir to move your files to your plugged in USB drive"
grep -q "automount|no" <<<"$OUT" && \
echo -e "\nYou should enable automount to use your plugged in USB drive"
}