|
@@ -47,6 +47,33 @@ ghost_variables=(GHOST_VERSION
|
47
|
47
|
DDNS_PROVIDER
|
48
|
48
|
MY_USERNAME)
|
49
|
49
|
|
|
50
|
+function ghost_replace_proprietary_services {
|
|
51
|
+ replace_file=$1
|
|
52
|
+
|
|
53
|
+ sed -i 's|Twitter Profile|GNU Social Profile|g' $replace_file
|
|
54
|
+ sed -i 's|Twitter Username|GNU Social Username|g' $replace_file
|
|
55
|
+ sed -i 's|twitter.com|quitter.se|g' $replace_file
|
|
56
|
+ sed -i 's|Facebook Page|Hubzilla Channel|g' $replace_file
|
|
57
|
+ sed -i 's|www.facebook.com/username|hubzilladomain/username|g' $replace_file
|
|
58
|
+ sed -i 's|www.facebook.com/ghost|hubzilladomain/username|g' $replace_file
|
|
59
|
+ sed -i 's|www.facebook.com/testuser|hubzilladomain/username|g' $replace_file
|
|
60
|
+ sed -i 's|www.facebook.com/testing|hubzilladomain/username|g' $replace_file
|
|
61
|
+ sed -i 's|www.facebook.com/test|hubzilladomain/username|g' $replace_file
|
|
62
|
+ sed -i 's|www.facebook.com/yourUsername|hubzilladomain/username|g' $replace_file
|
|
63
|
+ sed -i 's|www.facebook.com/yourPage|hubzilladomain/username|g' $replace_file
|
|
64
|
+ sed -i 's|Facebook Username|Hubzilla Channel|g' $replace_file
|
|
65
|
+ sed -i 's|www.facebook.com|hubzilladomain|g' $replace_file
|
|
66
|
+ sed -i 's|facebook value|hubzilla value|g' $replace_file
|
|
67
|
+
|
|
68
|
+ sed -i '/<section class="share">/,/<\/section>/d' $replace_file
|
|
69
|
+}
|
|
70
|
+
|
|
71
|
+function ghost_replace_services {
|
|
72
|
+ ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/core/built/assets/ghost.js
|
|
73
|
+ ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/core/built/assets/ghost.min.js
|
|
74
|
+ ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/content/themes/casper/post.hbs
|
|
75
|
+}
|
|
76
|
+
|
50
|
77
|
function remove_user_ghost {
|
51
|
78
|
remove_username="$1"
|
52
|
79
|
}
|
|
@@ -97,6 +124,14 @@ function reconfigure_ghost {
|
97
|
124
|
function upgrade_ghost {
|
98
|
125
|
read_config_param "GHOST_DOMAIN_NAME"
|
99
|
126
|
|
|
127
|
+ GHOST_PATH=/var/www/$GHOST_DOMAIN_NAME/htdocs
|
|
128
|
+
|
|
129
|
+ function_check set_repo_commit
|
|
130
|
+ set_repo_commit $GHOST_PATH "ghost commit" "$GHOST_COMMIT" $GHOST_REPO
|
|
131
|
+
|
|
132
|
+ ghost_replace_services
|
|
133
|
+
|
|
134
|
+ systemctl restart ghost
|
100
|
135
|
}
|
101
|
136
|
|
102
|
137
|
function backup_local_ghost {
|
|
@@ -424,6 +459,8 @@ function install_ghost {
|
424
|
459
|
systemctl restart ghost
|
425
|
460
|
fi
|
426
|
461
|
|
|
462
|
+ ghost_replace_services
|
|
463
|
+
|
427
|
464
|
function_check nginx_ensite
|
428
|
465
|
nginx_ensite $GHOST_DOMAIN_NAME
|
429
|
466
|
|