Browse Source

Upgrading pleroma

Bob Mottram 8 years ago
parent
commit
5239a36ded

+ 7
- 0
src/freedombone-app-gnusocial View File

@@ -313,8 +313,15 @@ function upgrade_gnusocial {
313 313
         rm /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php
314 314
     fi
315 315
 
316
+    if [ -d $INSTALL_DIR/pleroma ]; then
317
+        if [ -f /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php ]; then
318
+            mv /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php
319
+        fi
320
+    fi
321
+
316 322
     gnusocial_hourly_script gnusocial $GNUSOCIAL_DOMAIN_NAME
317 323
     upgrade_pleroma "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" "$GNUSOCIAL_BACKGROUND_IMAGE_URL" "$GNUSOCIAL_TITLE"
324
+    chown -R www-data:www-data /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs
318 325
 }
319 326
 
320 327
 

+ 7
- 0
src/freedombone-app-postactiv View File

@@ -295,10 +295,17 @@ function upgrade_postactiv {
295 295
         rm /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/install.php
296 296
     fi
297 297
 
298
+    if [ -d $INSTALL_DIR/pleroma ]; then
299
+        if [ -f /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php ]; then
300
+            mv /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php
301
+        fi
302
+    fi
303
+
298 304
     function_check postactiv_running_script
299 305
     postactiv_running_script
300 306
 
301 307
     upgrade_pleroma "$POSTACTIV_DOMAIN_NAME" "postactiv" "$POSTACTIV_BACKGROUND_IMAGE_URL" "$POSTACTIV_TITLE"
308
+    chown -R www-data:www-data /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs
302 309
 }
303 310
 
304 311
 

+ 12
- 0
src/freedombone-utils-gnusocialtools View File

@@ -211,6 +211,13 @@ function install_pleroma {
211 211
 
212 212
     nginx_site=/etc/nginx/sites-available/${pleroma_domain}
213 213
     sed -i 's|index index.php;|index index.html;|g' $nginx_site
214
+
215
+    if [ -f /var/www/${pleroma_domain}/htdocs/index.php ]; then
216
+        mv /var/www/${pleroma_domain}/htdocs/index.php /var/www/${pleroma_domain}/htdocs/index_qvitter.php
217
+    fi
218
+    sed -i 's|index.php|index_qvitter.php|g' $nginx_site
219
+
220
+    chown -R www-data:www-data /var/www/${pleroma_domain}/htdocs
214 221
 }
215 222
 
216 223
 function upgrade_pleroma {
@@ -229,6 +236,11 @@ function upgrade_pleroma {
229 236
         fi
230 237
         cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${domain_name}/htdocs/
231 238
         pleroma_set_background_image_from_url "$domain_name" "$background_url" "$title"
239
+
240
+        if [ -f /var/www/${domain_name}/htdocs/index.php ]; then
241
+            mv /var/www/${domain_name}/htdocs/index.php /var/www/${domain_name}/htdocs/index_qvitter.php
242
+        fi
243
+        chown -R www-data:www-data /var/www/${domain_name}/htdocs
232 244
     else
233 245
         install_pleroma "${app_name}" "${domain_name}" "${background_url}" "${title}"
234 246
     fi