fix owncloud commands
This commit is contained in:
61
deploy.sh
61
deploy.sh
@@ -140,9 +140,16 @@ get_country_from_timezone() {
|
||||
|
||||
oc_installapp() {
|
||||
local appid="$1"
|
||||
docker exec -u www-data owncloud_server /var/www/owncloud/occ market:install $appid
|
||||
docker exec owncloud_server occ market:install $appid
|
||||
echo "$appid installed for owncloud"
|
||||
}
|
||||
|
||||
pause_if_enabled() {
|
||||
if [ "$SHOULD_PAUSE" = true ]; then
|
||||
read -n 1 -s -r -p "Press any key to continue..."
|
||||
echo # Move to a new line after keypress
|
||||
fi
|
||||
}
|
||||
# what this script needs to do:
|
||||
|
||||
#formatting variables:
|
||||
@@ -161,6 +168,17 @@ echo
|
||||
read -rp "Timezone (e.g. Europe/Amsterdam): " timezone < /dev/tty
|
||||
read -rp "Domain (e.g. example.com): " domain < /dev/tty
|
||||
|
||||
# Prompt the user to set the pause behavior (defaults to true)
|
||||
echo -e "${cyan}pause prompts${nc} will ask you to finish configuration for each application as the script goes."
|
||||
echo "disabling these means you'll have to do this after the script finishes, but allows you to run the script unattended."
|
||||
read -p "Enable pause prompts? [Y/n] " -n 1 -r
|
||||
echo # Move to a new line
|
||||
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
SHOULD_PAUSE=false
|
||||
else
|
||||
SHOULD_PAUSE=true
|
||||
fi
|
||||
|
||||
# Public IP (tries multiple services)
|
||||
publicip="$(curl -fsS https://api.ipify.org || curl -fsS https://ifconfig.me || echo "UNKNOWN")"
|
||||
|
||||
@@ -175,7 +193,7 @@ echo "|@ |A |$publicip "
|
||||
echo "|* |CNAME |@ "
|
||||
echo ""
|
||||
echo -e "once you've done this, press any key to ${underline}continue${nc}"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
|
||||
|
||||
@@ -292,18 +310,18 @@ cd /opt/dockge
|
||||
docker compose up -d
|
||||
|
||||
echo -e "${cyan}Dockge${nc} has been installed and launched. go to http://$localip:5001 and configure your username and password, then press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
# call replacements for nginx db
|
||||
replace_in_sqlite_db "/opt/stacks/npm/data/database.sqlite" "<domain>" $domain
|
||||
replace_in_sqlite_db "/opt/stacks/npm/data/database.sqlite" "<localip>" $localip
|
||||
replace_in_sqlite_db "/opt/stacks/npm/data/database.sqlite" "<adminpass>" $adminpass
|
||||
replace_in_sqlite_db "/opt/stacks/npm/data/database.sqlite" "<adminemail>" $adminemail
|
||||
replace_in_sqlite_db "/opt/stacks/npm/data/database.sqlite" "<localip>" $publicip
|
||||
|
||||
cd /opt/stacks/npm
|
||||
docker compose up -d
|
||||
|
||||
echo -e "${cyan}Nginx Proxy Manager${nc} has been installed and launched. go to http://$localip:81 and configure your username and password, then press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
echo ""
|
||||
echo -e "Multiple applications will now be installed in quick succession without continuous user prompting."
|
||||
echo -e "when each application is installed, you will see an output providing you the url to verify it is online"
|
||||
@@ -338,7 +356,6 @@ cd /opt/stacks/owncloud
|
||||
docker compose up -d
|
||||
echo "awaiting owncloud boot"
|
||||
sleep 120
|
||||
docker exec -u www-data owncloud_server /var/www/owncloud/occ maintenance:mode --on
|
||||
oc_installapp bookmarks
|
||||
oc_installapp calendar
|
||||
oc_installapp camerarawpreviews
|
||||
@@ -357,8 +374,8 @@ oc_installapp onlyoffice
|
||||
oc_installapp systemtags
|
||||
oc_installapp tasks
|
||||
|
||||
docker exec -u www-data owncloud_server /var/www/owncloud/occ config:app:set onlyoffice DocumentServerUrl --value="https://office.$domain/"
|
||||
docker exec -u www-data owncloud_server /var/www/owncloud/occ config:app:set onlyoffice jwt_secret --value="$onlyofficeJWT"
|
||||
docker exec owncloud_server occ config:app:set onlyoffice DocumentServerUrl --value="https://office.$domain/"
|
||||
docker exec owncloud_server occ config:app:set onlyoffice jwt_secret --value="$onlyofficeJWT"
|
||||
echo -e "${cyan}owncloud${nc} has been launched from http://cloud.$domain, check if it is online and working, it may take a bit to launch. 502 error = still starting"
|
||||
|
||||
cd /opt/stacks/site
|
||||
@@ -369,6 +386,10 @@ cd /opt/stacks/vaultwarden
|
||||
docker compose up -d
|
||||
echo -e "${cyan}vaultwarden${nc} has been launched from http://vault.$domain, verify it is online"
|
||||
|
||||
#pihole
|
||||
cd /opt/stacks/pihole
|
||||
docker compose up -d
|
||||
echo -e "${cyan}pihole${nc} has been launched from http://dns.$domain, to use pihole as your DNS provider, set your DNS to $localip in your router for DHCP and on your device for any device with a static ip. Currently, the DNS is configured to use the joindns4.eu DNS, which *also* has built-in adblocking."
|
||||
|
||||
|
||||
cd /opt/stacks/downloader
|
||||
@@ -387,19 +408,20 @@ echo -e "${cyan}downloader${nc} has been launched from http://download.$domain,
|
||||
echo -e "${cyan}dozzle${nc} has been launched from http://dozzle.$domain, verify it is online, do not worry if the UI gives a time-out error, this is due to docker being busy while this script runs."
|
||||
echo -e "${cyan}Nginx Proxy Manager${nc} has been installed, configured and launched from http://proxy.$domain"
|
||||
echo -e "${cyan}Dockge${nc} has been installed, configured and launched from http://docker.$domain"
|
||||
echo -e "${cyan}pihole${nc} has been launched from http://dns.$domain, to use pihole as your DNS provider, set your DNS to $localip in your router for DHCP and on your device for any device with a static ip. Currently, the DNS is configured to use the joindns4.eu DNS, which *also* has built-in adblocking."
|
||||
|
||||
|
||||
#bookstack
|
||||
cd /opt/stacks/bookstack
|
||||
docker compose up -d
|
||||
echo -e "${cyan}bookstack${nc} has been launched from http://docs.$domain, verify it is online (this may take a bit) and log in with email 'admin@admin.com' and password 'password', then reset this account to use $adminemail and your password. afterwards, press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
#browser
|
||||
cd /opt/stacks/browser
|
||||
docker compose up -d
|
||||
echo -e "${cyan}filebrowser${nc} has been launched from http://browser.$domain, head to dockge (http://docker.$domain), open the filebrowser stack and check the logs for the initial admin password. make sure to change this in filebrowser's config, then press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
#jellyfin
|
||||
cd /opt/stacks/jellyfin
|
||||
@@ -407,26 +429,21 @@ docker compose up -d
|
||||
mkdir /opt/stacks/jellyfin/media/shows
|
||||
mkdir /opt/stacks/jellyfin/media/movies
|
||||
echo -e "${cyan}jellyfin${nc} has launched from http://video.$domain, perform the initial setup and press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
#uptimekuma
|
||||
cd /opt/stacks/kuma
|
||||
docker compose up -d
|
||||
echo -e "${cyan}uptime kuma${nc} has been launched from http://status.$domain, perform the initial setup, choosing embedded mariaDB, then press any key to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
|
||||
#pihole
|
||||
|
||||
cd /opt/stacks/pihole
|
||||
docker compose up -d
|
||||
echo -e "${cyan}pihole${nc} has been launched from http://dns.$domain, to use pihole as your DNS provider, set your DNS to $localip in your router for DHCP and on your device for any device with a static ip. Currently, the DNS is configured to use the joindns4.eu DNS, which *also* has built-in adblocking."
|
||||
|
||||
#dashboard
|
||||
replace_in_sqlite_db "/opt/stacks/dashboard/config/www/app.sqlite" "<domain>" $domain
|
||||
cd /opt/stacks/dashboard
|
||||
docker compose up -d
|
||||
echo -e "${cyan}dashboard${nc} has been launched from http://dash.$domain, verify it is online, check that its entries work and press any button to continue"
|
||||
read -n 1 -s -r -p ""
|
||||
pause_if_enabled
|
||||
#doesnt work yet
|
||||
|
||||
|
||||
@@ -435,8 +452,4 @@ echo ""
|
||||
echo ""
|
||||
echo -e "you can now access the dockge GUI interface at $localip:5001 and the proxy interface at $localip:81 once you start it from Dockge. be sure to forward ports 80, 443 and 51820 to $localip in your router settings"
|
||||
echo -e "to use ${green}pihole${nc} as your DNS provider, set your DNS to $localip in your router for DHCP and on your device for any device with a static ip. Currently, the DNS is configured to use the joindns4.eu DNS, which also has built-in adblocking."
|
||||
echo "please reboot before further use"
|
||||
|
||||
|
||||
|
||||
-e
|
||||
echo "please reboot before further use"
|
||||
Reference in New Issue
Block a user