| 
				
			 | 
			
			
				@@ -389,31 +389,36 @@ function upgrade_pleroma_frontend { 
			 | 
		
	
		
			
			| 
				389
			 | 
			
				389
			 | 
			
			
				             echo 'Unable to build pleroma' 
			 | 
		
	
		
			
			| 
				390
			 | 
			
				390
			 | 
			
			
				             exit 268362 
			 | 
		
	
		
			
			| 
				391
			 | 
			
				391
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				392
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/logo.png ]; then 
			 | 
		
	
		
			
			| 
				393
			 | 
			
				
			 | 
			
			
				-            cp /var/www/${domain_name}/htdocs/static/logo.png /var/www/${domain_name}/htdocs/static/logo.png.old 
			 | 
		
	
		
			
			| 
				
			 | 
			
				392
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				393
			 | 
			
			
				+        basedir=/var/www/${domain_name}/htdocs 
			 | 
		
	
		
			
			| 
				
			 | 
			
				394
			 | 
			
			
				+        if [[ "$app_name" != 'pleroma' ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				395
			 | 
			
			
				+            basedir=$PLEROMA_DIR/priv/static 
			 | 
		
	
		
			
			| 
				
			 | 
			
				396
			 | 
			
			
				+        fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				397
			 | 
			
			
				+        if [ -f $basedir/static/logo.png ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				398
			 | 
			
			
				+            cp $basedir/static/logo.png $basedir/static/logo.png.old 
			 | 
		
	
		
			
			| 
				394
			 | 
			
				399
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				395
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/bg.jpg ]; then 
			 | 
		
	
		
			
			| 
				396
			 | 
			
				
			 | 
			
			
				-            cp /var/www/${domain_name}/htdocs/static/bg.jpg /var/www/${domain_name}/htdocs/static/bg.jpg.old 
			 | 
		
	
		
			
			| 
				
			 | 
			
				400
			 | 
			
			
				+        if [ -f $basedir/static/bg.jpg ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				401
			 | 
			
			
				+            cp $basedir/static/bg.jpg $basedir/static/bg.jpg.old 
			 | 
		
	
		
			
			| 
				397
			 | 
			
				402
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				398
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/config.json ]; then 
			 | 
		
	
		
			
			| 
				399
			 | 
			
				
			 | 
			
			
				-            cp /var/www/${domain_name}/htdocs/static/config.json /var/www/${domain_name}/htdocs/static/config.json.old 
			 | 
		
	
		
			
			| 
				
			 | 
			
				403
			 | 
			
			
				+        if [ -f $basedir/static/config.json ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				404
			 | 
			
			
				+            cp $basedir/static/config.json $basedir/static/config.json.old 
			 | 
		
	
		
			
			| 
				400
			 | 
			
				405
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				401
			 | 
			
				
			 | 
			
			
				-        cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${domain_name}/htdocs/ 
			 | 
		
	
		
			
			| 
				402
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/config.json.old ]; then 
			 | 
		
	
		
			
			| 
				403
			 | 
			
				
			 | 
			
			
				-            mv /var/www/${domain_name}/htdocs/static/config.json.old /var/www/${domain_name}/htdocs/static/config.json 
			 | 
		
	
		
			
			| 
				
			 | 
			
				406
			 | 
			
			
				+        cp -r $INSTALL_DIR/pleroma/dist/* $basedir/ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				407
			 | 
			
			
				+        if [ -f $basedir/static/config.json.old ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				408
			 | 
			
			
				+            mv $basedir/static/config.json.old $basedir/static/config.json 
			 | 
		
	
		
			
			| 
				404
			 | 
			
				409
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				405
			 | 
			
				
			 | 
			
			
				-        sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" /var/www/${domain_name}/htdocs/static/config.json 
			 | 
		
	
		
			
			| 
				406
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/logo.png.old ]; then 
			 | 
		
	
		
			
			| 
				407
			 | 
			
				
			 | 
			
			
				-            cp /var/www/${domain_name}/htdocs/static/logo.png.old /var/www/${domain_name}/htdocs/static/logo.png 
			 | 
		
	
		
			
			| 
				
			 | 
			
				410
			 | 
			
			
				+        sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" $basedir/static/config.json 
			 | 
		
	
		
			
			| 
				
			 | 
			
				411
			 | 
			
			
				+        if [ -f $basedir/static/logo.png.old ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				412
			 | 
			
			
				+            cp $basedir/static/logo.png.old $basedir/static/logo.png 
			 | 
		
	
		
			
			| 
				408
			 | 
			
				413
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				409
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/static/bg.jpg.old ]; then 
			 | 
		
	
		
			
			| 
				410
			 | 
			
				
			 | 
			
			
				-            cp /var/www/${domain_name}/htdocs/static/bg.jpg.old /var/www/${domain_name}/htdocs/static/bg.jpg 
			 | 
		
	
		
			
			| 
				
			 | 
			
				414
			 | 
			
			
				+        if [ -f $basedir/static/bg.jpg.old ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				415
			 | 
			
			
				+            cp $basedir/static/bg.jpg.old $basedir/static/bg.jpg 
			 | 
		
	
		
			
			| 
				411
			 | 
			
				416
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				412
			 | 
			
				417
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				413
			 | 
			
				
			 | 
			
			
				-        if [ -f /var/www/${domain_name}/htdocs/index.php ]; then 
			 | 
		
	
		
			
			| 
				414
			 | 
			
				
			 | 
			
			
				-            mv /var/www/${domain_name}/htdocs/index.php /var/www/${domain_name}/htdocs/index_qvitter.php 
			 | 
		
	
		
			
			| 
				
			 | 
			
				418
			 | 
			
			
				+        if [ -f $basedir/index.php ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				419
			 | 
			
			
				+            mv $basedir/index.php $basedir/index_qvitter.php 
			 | 
		
	
		
			
			| 
				415
			 | 
			
				420
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				416
			 | 
			
				
			 | 
			
			
				-        chown -R www-data:www-data /var/www/${domain_name}/htdocs 
			 | 
		
	
		
			
			| 
				
			 | 
			
				421
			 | 
			
			
				+        chown -R www-data:www-data $basedir 
			 | 
		
	
		
			
			| 
				417
			 | 
			
				422
			 | 
			
			
				     else 
			 | 
		
	
		
			
			| 
				418
			 | 
			
				423
			 | 
			
			
				         install_pleroma_front_end "${app_name}" "${domain_name}" "${background_url}" "${title}" 
			 | 
		
	
		
			
			| 
				419
			 | 
			
				424
			 | 
			
			
				     fi 
			 |