NextCloud Automated Installation
- 
 @bnrstnr Also, why would you want the hostname in there? It should be pretty rare that you use the hostname in a browser. 
- 
 @jaredbusch I thought that was the entire purpose of the hostname? I always set my hostname as the FQDN of whatever the server is... nextcloud.example.net seems like a perfect hostname for a nextcloud server, no? 
- 
 @bnrstnr said in NextCloud Automated Installation: @jaredbusch I thought that was the entire purpose of the hostname? I always set my hostname as the FQDN of whatever the server is... nextcloud.example.net seems like a perfect hostname for a nextcloud server, no? No that is not the purpose of a hostname. So you meant put the FQDN in the trusted domain. Pull request made to do that. 
 https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/1If someone has time to test my pull request, that would be great. source <(curl -s https://gitlab.com/sorvani/nextcloud_fedora_installer/raw/master/nextcloud_fedora.sh)
- 
 Here is the diff for anyone interested. diff --git a/nextcloud_fedora.sh b/nextcloud_fedora.sh index 9f79344..cbfd88e 100644 --- a/nextcloud_fedora.sh +++ b/nextcloud_fedora.sh @@ -31,6 +31,8 @@ echo "Enter the name of your web admin user account (ex. admin)" read adminuser echo "Enter the initial password for admin" read adminpass +echo "Enter the FQDN you setup for Nextcloud (ex. nc.domain.com)" +read ncfqdn export ncpath='/var/www/html/nextcloud' export datapath='/data' @@ -87,6 +89,10 @@ systemctl restart php-fpm cd $ncpath sudo -u apache php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "ncuser" --database-pass $ncpass --admin-user $adminuser --admin-pass $adminpass --data-dir $datapath sudo -u apache php occ config:system:set trusted_domains 1 --value=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') +if [-n $ncfqdn] +then + sudo -u apache php occ config:system:set trusted_domains 2 --value=$ncfqdn +fi sed -i "$ d" /var/www/html/nextcloud/config/config.php echo " 'memcache.locking' => '\OC\Memcache\Redis'," >> /var/www/html/nextcloud/config/config.php
- 
 @jaredbusch said in NextCloud Automated Installation: If someone has time to test my pull request, that would be great. Testing now. 
- 
 
- 
 Looks like @scottalanmiller never tested on minimal. wgetis not installed on your system.
- 
 I also do not know why he is using unzip instead of the bz2, but meh. 
- 
 no clue how to easily make a second pull request without blowing out the first one.. build a Fedora 27 instance, install wgetmanually, and then run the script.
- 
 @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time... 
 -bash: [-n: command not found] 
- 
 @bnrstnr said in NextCloud Automated Installation: @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time... No idea why you are getting the cockpit error. Nothing in the script references it. -bash: [-n: command not found]Damnit, I didn't put the variable in quotes.. 
- 
 @jaredbusch said in NextCloud Automated Installation: @bnrstnr said in NextCloud Automated Installation: @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time... No idea why you are getting the cockpit error. Nothing in the script references it. -bash: [-n: command not found]Damnit, I didn't put the variable in quotes.. Fixed that. 
- 
 If it still doesn't like it I will switch the -nto! -zbut I thought-nwas supposed to return a length and any length not zero should cause it to return true./me is not a bash scripter in general... 
- 
 @JaredBusch that appears to have worked, I'll try again without any input in that field. Only problem I had with your script was you put dnf -y wget installI forked it and fixed it on mine and everything worked as planned.
- 
 @bnrstnr said in NextCloud Automated Installation: @JaredBusch that appears to have worked, I'll try again without any input in that field. Only problem I had with your script was you put dnf -y wget installI forked it and fixed it on mine and everything worked as planned.damnit all to hell... jsut thought to drop that in there right quick while I was fixing the syntax... 
- 
 ok fixed and merge req 3 made to @scottalanmiller's repo. 
 https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/3
- 
 @jaredbusch said in NextCloud Automated Installation: ok fixed and merge req 3 made to @scottalanmiller's repo. 
 https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/3It is now merged. 
- 
 Hei, Is there no update of this script to work with Fedora 31 and Nextcloud 17? Best regards, 
 Woti
- 
 @Woti said in NextCloud Automated Installation: Hei, Is there no update of this script to work with Fedora 31 and Nextcloud 17? Best regards, 
 WotiThat should be easy to update. Building a test server now. 
- 
 This could be nice  


