| 
				
			 | 
			
			
				@@ -6472,31 +6472,6 @@ function add_ddns_domain { 
			 | 
		
	
		
			
			| 
				6472
			 | 
			
				6472
			 | 
			
			
				     CURRENT_DDNS_DOMAIN= 
			 | 
		
	
		
			
			| 
				6473
			 | 
			
				6473
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				6474
			 | 
			
				6474
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				6475
			 | 
			
				
			 | 
			
			
				-function configure_owncloud_onion_site { 
			 | 
		
	
		
			
			| 
				6476
			 | 
			
				
			 | 
			
			
				-    if [ ! $OWNCLOUD_DOMAIN_NAME ]; then 
			 | 
		
	
		
			
			| 
				6477
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				6478
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				6479
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /var/www/owncloud/config/config.php ]; then 
			 | 
		
	
		
			
			| 
				6480
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				6481
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				6482
			 | 
			
				
			 | 
			
			
				-    if [ ! -f /var/lib/tor/hidden_service_owncloud/hostname ]; then 
			 | 
		
	
		
			
			| 
				6483
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				6484
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				6485
			 | 
			
				
			 | 
			
			
				-    OWNCLOUD_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_owncloud/hostname) 
			 | 
		
	
		
			
			| 
				6486
			 | 
			
				
			 | 
			
			
				-    if ! grep -q "${OWNCLOUD_ONION_HOSTNAME}" /var/www/owncloud/config/config.php; then 
			 | 
		
	
		
			
			| 
				6487
			 | 
			
				
			 | 
			
			
				-        sed -i "s|0 => '${OWNCLOUD_DOMAIN_NAME}',|0 => '${OWNCLOUD_DOMAIN_NAME}', 
			 | 
		
	
		
			
			| 
				6488
			 | 
			
				
			 | 
			
			
				-    1 => '${OWNCLOUD_ONION_HOSTNAME}',|g" /var/www/owncloud/config/config.php 
			 | 
		
	
		
			
			| 
				6489
			 | 
			
				
			 | 
			
			
				-        sed -i "s|'writable' => false,|'writable' => false, 
			 | 
		
	
		
			
			| 
				6490
			 | 
			
				
			 | 
			
			
				-    ), 
			 | 
		
	
		
			
			| 
				6491
			 | 
			
				
			 | 
			
			
				-    1 => 
			 | 
		
	
		
			
			| 
				6492
			 | 
			
				
			 | 
			
			
				-    array ( 
			 | 
		
	
		
			
			| 
				6493
			 | 
			
				
			 | 
			
			
				-      'path' => '/var/www/owncloud/apps', 
			 | 
		
	
		
			
			| 
				6494
			 | 
			
				
			 | 
			
			
				-      'url' => '/apps', 
			 | 
		
	
		
			
			| 
				6495
			 | 
			
				
			 | 
			
			
				-      'writable' => false,|g" /var/www/owncloud/config/config.php 
			 | 
		
	
		
			
			| 
				6496
			 | 
			
				
			 | 
			
			
				-        echo $'Owncloud configured for onion site' 
			 | 
		
	
		
			
			| 
				6497
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				6498
			 | 
			
				
			 | 
			
			
				-} 
			 | 
		
	
		
			
			| 
				6499
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				6500
			 | 
			
				6475
			 | 
			
			
				 function upgrade_owncloud_start { 
			 | 
		
	
		
			
			| 
				6501
			 | 
			
				6476
			 | 
			
			
				     # copies data and config directories to a temporary upgrade directory 
			 | 
		
	
		
			
			| 
				6502
			 | 
			
				6477
			 | 
			
			
				     if [ ! -d /etc/owncloud ]; then 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -6902,10 +6877,10 @@ function install_owncloud_official_deb { 
			 | 
		
	
		
			
			| 
				6902
			 | 
			
				6877
			 | 
			
			
				         cp $OWNCLOUD_PATH/config/config.sample.php $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
		
			
			| 
				6903
			 | 
			
				6878
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				6904
			 | 
			
				6879
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				6905
			 | 
			
				
			 | 
			
			
				-    if [ -f $OWNCLOUD_UPGRADE_PATH/config/config.php ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				6880
			 | 
			
			
				+    if [ -f $OWNCLOUD_PATH/config/config.php ]; then 
			 | 
		
	
		
			
			| 
				6906
			 | 
			
				6881
			 | 
			
			
				         OWNCLOUD_INSTANCE_ID="$(openssl rand -base64 14 | cut -c1-12)" 
			 | 
		
	
		
			
			| 
				6907
			 | 
			
				6882
			 | 
			
			
				         OWNCLOUD_PASSWORD_SALT="$(openssl rand -base64 32 | cut -c1-30)" 
			 | 
		
	
		
			
			| 
				6908
			 | 
			
				
			 | 
			
			
				-        OWNCLOUD_DATA_DIR='/var/www/owncloud/data' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				6883
			 | 
			
			
				+        OWNCLOUD_DATA_DIR="$OWNCLOUD_PATH/data" 
			 | 
		
	
		
			
			| 
				6909
			 | 
			
				6884
			 | 
			
			
				         OWNCLOUD_DBTYPE='mysql' 
			 | 
		
	
		
			
			| 
				6910
			 | 
			
				6885
			 | 
			
			
				         OWNCLOUD_DBNAME='owncloud' 
			 | 
		
	
		
			
			| 
				6911
			 | 
			
				6886
			 | 
			
			
				         OWNCLOUD_DBHOST='localhost' 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -6913,6 +6888,8 @@ function install_owncloud_official_deb { 
			 | 
		
	
		
			
			| 
				6913
			 | 
			
				6888
			 | 
			
			
				         OWNCLOUD_DBPASS="$OWNCLOUD_ADMIN_PASSWORD" 
			 | 
		
	
		
			
			| 
				6914
			 | 
			
				6889
			 | 
			
			
				         OWNCLOUD_SECRET="$(openssl rand -base64 32 | cut -c1-30)$(openssl rand -base64 32 | cut -c1-30)$(openssl rand -base64 32 | cut -c1-30)$(openssl rand -base64 32 | cut -c1-30)" 
			 | 
		
	
		
			
			| 
				6915
			 | 
			
				6890
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				6891
			 | 
			
			
				+        sed -i "s|demo.example.org|${OWNCLOUD_DOMAIN_NAME}|g" $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
		
			
			| 
				
			 | 
			
				6892
			 | 
			
			
				+        sed -i "s|otherdomain.example.org|${OWNCLOUD_ONION_HOSTNAME}|g" $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
		
			
			| 
				6916
			 | 
			
				6893
			 | 
			
			
				         sed -i "s|'instanceid'.*|'instanceid' => '$OWNCLOUD_INSTANCE_ID',|g" $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
		
			
			| 
				6917
			 | 
			
				6894
			 | 
			
			
				         sed -i "s|'passwordsalt'.*|'passwordsalt' => '$OWNCLOUD_PASSWORD_SALT',|g" $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
		
			
			| 
				6918
			 | 
			
				6895
			 | 
			
			
				         sed -i "s|'datadirectory'.*|'datadirectory' => '$OWNCLOUD_DATA_DIR',|g" $OWNCLOUD_PATH/config/config.php 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -10904,7 +10881,6 @@ install_web_server_access_control 
			 | 
		
	
		
			
			| 
				10904
			 | 
			
				10881
			 | 
			
			
				 configure_firewall_for_web_server 
			 | 
		
	
		
			
			| 
				10905
			 | 
			
				10882
			 | 
			
			
				 install_owncloud_official_deb 
			 | 
		
	
		
			
			| 
				10906
			 | 
			
				10883
			 | 
			
			
				 install_owncloud_repo_music_app 
			 | 
		
	
		
			
			| 
				10907
			 | 
			
				
			 | 
			
			
				-configure_owncloud_onion_site 
			 | 
		
	
		
			
			| 
				10908
			 | 
			
				10884
			 | 
			
			
				 upgrade_golang 
			 | 
		
	
		
			
			| 
				10909
			 | 
			
				10885
			 | 
			
			
				 install_gogs 
			 | 
		
	
		
			
			| 
				10910
			 | 
			
				10886
			 | 
			
			
				 install_xmpp 
			 |