mirror of
https://github.com/EV21/uberspace-helper.git
synced 2026-10-08 04:43:18 +02:00
simplify interaction by removing external domain
- adding an external domain requires more interaction - also add ncc wrapper script as a convenience for occ
This commit is contained in:
1 file changed
+17
-6
@@ -5,9 +5,8 @@ function install_nextcloud
|
|||||||
echo "Please set your Nextcloud login credentials."
|
echo "Please set your Nextcloud login credentials."
|
||||||
read -r -p "Nextcloud admin user: " NEXTCLOUD_ADMIN_USER
|
read -r -p "Nextcloud admin user: " NEXTCLOUD_ADMIN_USER
|
||||||
read -r -p "Nextcloud admin password: " NEXTCLOUD_ADMIN_PASS
|
read -r -p "Nextcloud admin password: " NEXTCLOUD_ADMIN_PASS
|
||||||
setup_domains
|
trusted_domain="$USER.uber.space"
|
||||||
echo "Set one of the configured domains that your Nextcloud will be accessed with as \"trusted\":"
|
#setup_domains
|
||||||
read -r trusted_domain
|
|
||||||
setup_php
|
setup_php
|
||||||
# simply get the first password string from ~/.my.cnf
|
# simply get the first password string from ~/.my.cnf
|
||||||
MYSQL_PASSWORD_STR=$(grep --max-count=1 password= ~/.my.cnf)
|
MYSQL_PASSWORD_STR=$(grep --max-count=1 password= ~/.my.cnf)
|
||||||
@@ -59,10 +58,12 @@ function install_nextcloud
|
|||||||
setup_redis
|
setup_redis
|
||||||
install_notify_push
|
install_notify_push
|
||||||
install_nextcloud_updater
|
install_nextcloud_updater
|
||||||
|
install_ncc
|
||||||
|
|
||||||
/usr/sbin/restorecon -R ~/html
|
/usr/sbin/restorecon -R ~/html
|
||||||
|
|
||||||
echo "You can now access your Nextcloud by directing you Browser to https://$trusted_domain"
|
printf "If you want to use another domain read:\n https://lab.uberspace.de/guide_nextcloud.html#set-the-trusted-domain\n"
|
||||||
|
printf "You can now access your Nextcloud by directing you Browser to: \n https://%s \n" "$trusted_domain"
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_domains
|
function setup_domains
|
||||||
@@ -78,6 +79,7 @@ function add_domain
|
|||||||
{
|
{
|
||||||
read -rp "Domain: " DOMAIN
|
read -rp "Domain: " DOMAIN
|
||||||
uberspace web domain add "$DOMAIN"
|
uberspace web domain add "$DOMAIN"
|
||||||
|
trusted_domain=$DOMAIN
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_php
|
function setup_php
|
||||||
@@ -167,6 +169,16 @@ end_of_content
|
|||||||
php ~/html/occ notify_push:setup https://"$trusted_domain"/push
|
php ~/html/occ notify_push:setup https://"$trusted_domain"/push
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_ncc
|
||||||
|
{
|
||||||
|
touch ~/bin/ncc
|
||||||
|
cat << end_of_content > ~/bin/ncc
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
php ~/html/occ "\$@"
|
||||||
|
end_of_content
|
||||||
|
chmod +x ~/bin/nextcloud-update
|
||||||
|
}
|
||||||
|
|
||||||
function install_nextcloud_updater
|
function install_nextcloud_updater
|
||||||
{
|
{
|
||||||
touch ~/bin/nextcloud-update
|
touch ~/bin/nextcloud-update
|
||||||
@@ -219,8 +231,7 @@ function main
|
|||||||
{
|
{
|
||||||
set_critical_section
|
set_critical_section
|
||||||
|
|
||||||
echo "This script tries to install the latest release of Nextcloud"
|
echo "This script installs the latest release of Nextcloud"
|
||||||
echo "but it is tested for Nextcloud 23 on Uberspace 7.12.0"
|
|
||||||
echo "and assumes a newly created Uberspace with default settings."
|
echo "and assumes a newly created Uberspace with default settings."
|
||||||
echo "Do not run this script if you already use your Uberspace for other apps!"
|
echo "Do not run this script if you already use your Uberspace for other apps!"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user