danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 71 forks source link

Problem with assigned IP when installing? #99

Closed MyHaven closed 4 years ago

MyHaven commented 4 years ago

I have assigned IP in the config file, and it reads:

JAIL_IP="192.168.1.75"

However when I run ./nextcloud-jail.sh I get the following message: Please provide a valid ip: Only decimal digits permitted in '75\r' in 192.168.1.75\r'

MyHaven commented 4 years ago

I found the solution! I was creating the textfile in Notepad++ in windows, and the line break in Windows is apparently different from Unix.

I finally found the solution here: https://www.ixsystems.com/community/resources/why-does-editing-a-freenas-script-text-file-on-a-windows-pc-cause-issues-when-copied-to-nas.67/

First I suspected charset to be the issue, but it was a matter of converting the document line breaks from CR LF to LF

danb35 commented 4 years ago

Notepad++ is a good editor, and I'm sure there's a way to fix the newlines in it, but yes, this is a common problem when using Windows-based editors for files on *nix systems.