| 
				
			 | 
			
			
				@@ -44,12 +44,6 @@ GNUSOCIAL_BACKGROUND_IMAGE_URL= 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				44
			 | 
			
			
				 GNUSOCIAL_MARKDOWN_REPO="https://git.gnu.io/chimo/markdown.git" 
			 | 
		
	
		
			
			| 
				45
			 | 
			
				45
			 | 
			
			
				 GNUSOCIAL_MARKDOWN_COMMIT='03c53942f94b3376f0946e6e1fe566cc21ccf232' 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				46
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				47
			 | 
			
				
			 | 
			
			
				-# Sharings plugin for gnusocial 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				
			 | 
			
			
				-SHARINGS_REPO="http://git.lasindias.club/bashrc/Sharings" 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				
			 | 
			
			
				-SHARINGS_COMMIT='d5c6c7f855d9afff9086c09ea706f38c859bc0d4' 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				
			 | 
			
			
				-SHARINGS_THEME_REPO="http://git.lasindias.club/manuel/SharingsTheme" 
			 | 
		
	
		
			
			| 
				51
			 | 
			
				
			 | 
			
			
				-SHARINGS_THEME_COMMIT='7106c7ef03' 
			 | 
		
	
		
			
			| 
				52
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				53
			 | 
			
				47
			 | 
			
			
				 GNUSOCIAL_TITLE='Pleroma FE' 
			 | 
		
	
		
			
			| 
				54
			 | 
			
				48
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				55
			 | 
			
				49
			 | 
			
			
				 # Number of months after which posts expire 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -61,10 +55,7 @@ gnusocial_variables=(ONION_ONLY 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				55
			 | 
			
			
				                      GNUSOCIAL_WELCOME_MESSAGE 
			 | 
		
	
		
			
			| 
				62
			 | 
			
				56
			 | 
			
			
				                      GNUSOCIAL_BACKGROUND_IMAGE_URL 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				57
			 | 
			
			
				                      DDNS_PROVIDER 
			 | 
		
	
		
			
			| 
				64
			 | 
			
				
			 | 
			
			
				-                     GNUSOCIAL_MARKDOWN_REPO 
			 | 
		
	
		
			
			| 
				65
			 | 
			
				58
			 | 
			
			
				                      GNUSOCIAL_MARKDOWN_COMMIT 
			 | 
		
	
		
			
			| 
				66
			 | 
			
				
			 | 
			
			
				-                     SHARINGS_REPO 
			 | 
		
	
		
			
			| 
				67
			 | 
			
				
			 | 
			
			
				-                     SHARINGS_THEME_REPO 
			 | 
		
	
		
			
			| 
				68
			 | 
			
				59
			 | 
			
			
				                      GNUSOCIAL_TITLE 
			 | 
		
	
		
			
			| 
				69
			 | 
			
				60
			 | 
			
			
				                      GNUSOCIAL_EXPIRE_MONTHS 
			 | 
		
	
		
			
			| 
				70
			 | 
			
				61
			 | 
			
			
				                      MY_USERNAME) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -797,129 +788,6 @@ function install_gnusocial_main { 
			 | 
		
	
		
			
			| 
				797
			 | 
			
				788
			 | 
			
			
				     install_completed gnusocial_main 
			 | 
		
	
		
			
			| 
				798
			 | 
			
				789
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				799
			 | 
			
				790
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				800
			 | 
			
				
			 | 
			
			
				-function install_gnusocial_plugin_sharings { 
			 | 
		
	
		
			
			| 
				801
			 | 
			
				
			 | 
			
			
				-    if [ ! -d /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins ]; then 
			 | 
		
	
		
			
			| 
				802
			 | 
			
				
			 | 
			
			
				-        echo $'No local/plugins directory found for the gnusocial' 
			 | 
		
	
		
			
			| 
				803
			 | 
			
				
			 | 
			
			
				-        exit 72945 
			 | 
		
	
		
			
			| 
				804
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				805
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				806
			 | 
			
				
			 | 
			
			
				-    apt-get -yq install liblocale-msgfmt-perl gettext 
			 | 
		
	
		
			
			| 
				807
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				808
			 | 
			
				
			 | 
			
			
				-    # update to the next commit 
			 | 
		
	
		
			
			| 
				809
			 | 
			
				
			 | 
			
			
				-    function_check set_repo_commit 
			 | 
		
	
		
			
			| 
				810
			 | 
			
				
			 | 
			
			
				-    set_repo_commit /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins "gnusocial sharings plugin commit" "$SHARINGS_COMMIT" $SHARINGS_REPO 
			 | 
		
	
		
			
			| 
				811
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				812
			 | 
			
				
			 | 
			
			
				-    if [[ $(app_is_installed gnusocial_plugin_sharings) == "1" ]]; then 
			 | 
		
	
		
			
			| 
				813
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				814
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				815
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				816
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins 
			 | 
		
	
		
			
			| 
				817
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				818
			 | 
			
				
			 | 
			
			
				-    if [ -d /repos/sharings ]; then 
			 | 
		
	
		
			
			| 
				819
			 | 
			
				
			 | 
			
			
				-        mkdir Sharings 
			 | 
		
	
		
			
			| 
				820
			 | 
			
				
			 | 
			
			
				-        cp -r -p /repos/sharings/. Sharings 
			 | 
		
	
		
			
			| 
				821
			 | 
			
				
			 | 
			
			
				-        cd Sharings 
			 | 
		
	
		
			
			| 
				822
			 | 
			
				
			 | 
			
			
				-        git pull 
			 | 
		
	
		
			
			| 
				823
			 | 
			
				
			 | 
			
			
				-    else 
			 | 
		
	
		
			
			| 
				824
			 | 
			
				
			 | 
			
			
				-        function_check git_clone 
			 | 
		
	
		
			
			| 
				825
			 | 
			
				
			 | 
			
			
				-        git_clone $SHARINGS_REPO Sharings 
			 | 
		
	
		
			
			| 
				826
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				827
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				828
			 | 
			
				
			 | 
			
			
				-    if [ ! -d /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings ]; then 
			 | 
		
	
		
			
			| 
				829
			 | 
			
				
			 | 
			
			
				-        echo $'Unable to clone gnusocial sharings plugin' 
			 | 
		
	
		
			
			| 
				830
			 | 
			
				
			 | 
			
			
				-        exit 36738 
			 | 
		
	
		
			
			| 
				831
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				832
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				833
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings 
			 | 
		
	
		
			
			| 
				834
			 | 
			
				
			 | 
			
			
				-    git stash 
			 | 
		
	
		
			
			| 
				835
			 | 
			
				
			 | 
			
			
				-    git checkout master 
			 | 
		
	
		
			
			| 
				836
			 | 
			
				
			 | 
			
			
				-    git branch -D $SHARINGS_COMMIT 
			 | 
		
	
		
			
			| 
				837
			 | 
			
				
			 | 
			
			
				-    git checkout $SHARINGS_COMMIT -b $SHARINGS_COMMIT 
			 | 
		
	
		
			
			| 
				838
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				839
			 | 
			
				
			 | 
			
			
				-    # enable the plugin 
			 | 
		
	
		
			
			| 
				840
			 | 
			
				
			 | 
			
			
				-    if ! grep -q "addPlugin('Sharings');" /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/config.php; then 
			 | 
		
	
		
			
			| 
				841
			 | 
			
				
			 | 
			
			
				-        echo "addPlugin('Sharings');" >> /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/config.php 
			 | 
		
	
		
			
			| 
				842
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				843
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				844
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				845
			 | 
			
				
			 | 
			
			
				-    php scripts/checkschema.php 
			 | 
		
	
		
			
			| 
				846
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings 
			 | 
		
	
		
			
			| 
				847
			 | 
			
				
			 | 
			
			
				-    php scripts/seedsharings.php 
			 | 
		
	
		
			
			| 
				848
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				849
			 | 
			
				
			 | 
			
			
				-    php scripts/upgrade.php 
			 | 
		
	
		
			
			| 
				850
			 | 
			
				
			 | 
			
			
				-    php scripts/checkschema.php 
			 | 
		
	
		
			
			| 
				851
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				852
			 | 
			
				
			 | 
			
			
				-    # Languages 
			 | 
		
	
		
			
			| 
				853
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en/LC_MESSAGES 
			 | 
		
	
		
			
			| 
				854
			 | 
			
				
			 | 
			
			
				-    msgfmt -o Sharings.mo Sharings.po 
			 | 
		
	
		
			
			| 
				855
			 | 
			
				
			 | 
			
			
				-    if [ ! -f Sharings.po ]; then 
			 | 
		
	
		
			
			| 
				856
			 | 
			
				
			 | 
			
			
				-        echo $'English translations for gnusocial sharings plugin were not created' 
			 | 
		
	
		
			
			| 
				857
			 | 
			
				
			 | 
			
			
				-        exit 84352 
			 | 
		
	
		
			
			| 
				858
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				859
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en_GB/LC_MESSAGES 
			 | 
		
	
		
			
			| 
				860
			 | 
			
				
			 | 
			
			
				-    msgfmt -o Sharings.mo Sharings.po 
			 | 
		
	
		
			
			| 
				861
			 | 
			
				
			 | 
			
			
				-    if [ ! -f Sharings.po ]; then 
			 | 
		
	
		
			
			| 
				862
			 | 
			
				
			 | 
			
			
				-        echo $'English (GB) translations for gnusocial sharings plugin were not created' 
			 | 
		
	
		
			
			| 
				863
			 | 
			
				
			 | 
			
			
				-        exit 84352 
			 | 
		
	
		
			
			| 
				864
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				865
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings/locale/en_US/LC_MESSAGES 
			 | 
		
	
		
			
			| 
				866
			 | 
			
				
			 | 
			
			
				-    msgfmt -o Sharings.mo Sharings.po 
			 | 
		
	
		
			
			| 
				867
			 | 
			
				
			 | 
			
			
				-    if [ ! -f Sharings.po ]; then 
			 | 
		
	
		
			
			| 
				868
			 | 
			
				
			 | 
			
			
				-        echo $'English (US) translations for gnusocial sharings plugin were not created' 
			 | 
		
	
		
			
			| 
				869
			 | 
			
				
			 | 
			
			
				-        exit 84352 
			 | 
		
	
		
			
			| 
				870
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				871
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				872
			 | 
			
				
			 | 
			
			
				-    # Looks like this update function isn't supported by the current php version 
			 | 
		
	
		
			
			| 
				873
			 | 
			
				
			 | 
			
			
				-    sed -i 's|ActivityVerb::UPDATE, ||g' /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/Sharings/SharingsPlugin.php 
			 | 
		
	
		
			
			| 
				874
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				875
			 | 
			
				
			 | 
			
			
				-    chown -R www-data:www-data /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				876
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				877
			 | 
			
				
			 | 
			
			
				-    set_completion_param gnusocial "sharings plugin commit" "$SHARINGS_COMMIT" 
			 | 
		
	
		
			
			| 
				878
			 | 
			
				
			 | 
			
			
				-    install_completed gnusocial_plugin_sharings 
			 | 
		
	
		
			
			| 
				879
			 | 
			
				
			 | 
			
			
				-} 
			 | 
		
	
		
			
			| 
				880
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				881
			 | 
			
				
			 | 
			
			
				-function install_gnusocial_plugin_sharings_theme { 
			 | 
		
	
		
			
			| 
				882
			 | 
			
				
			 | 
			
			
				-    if [ ! -d /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins ]; then 
			 | 
		
	
		
			
			| 
				883
			 | 
			
				
			 | 
			
			
				-        echo $'No local/plugins directory found for the gnusocial' 
			 | 
		
	
		
			
			| 
				884
			 | 
			
				
			 | 
			
			
				-        exit 74458 
			 | 
		
	
		
			
			| 
				885
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				886
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				887
			 | 
			
				
			 | 
			
			
				-    # update to the next commit 
			 | 
		
	
		
			
			| 
				888
			 | 
			
				
			 | 
			
			
				-    function_check set_repo_commit 
			 | 
		
	
		
			
			| 
				889
			 | 
			
				
			 | 
			
			
				-    set_repo_commit /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins "gnusocial sharings theme plugin commit" "$SHARINGS_THEME_COMMIT" $SHARINGS_THEME_REPO 
			 | 
		
	
		
			
			| 
				890
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				891
			 | 
			
				
			 | 
			
			
				-    if [[ $(app_is_installed gnusocial_plugin_sharings_theme) == "1" ]]; then 
			 | 
		
	
		
			
			| 
				892
			 | 
			
				
			 | 
			
			
				-        return 
			 | 
		
	
		
			
			| 
				893
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				894
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				895
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins 
			 | 
		
	
		
			
			| 
				896
			 | 
			
				
			 | 
			
			
				-    function_check git_clone 
			 | 
		
	
		
			
			| 
				897
			 | 
			
				
			 | 
			
			
				-    git_clone $SHARINGS_THEME_REPO SharingsTheme 
			 | 
		
	
		
			
			| 
				898
			 | 
			
				
			 | 
			
			
				-    if [ ! -d /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/SharingsTheme ]; then 
			 | 
		
	
		
			
			| 
				899
			 | 
			
				
			 | 
			
			
				-        echo $'Unable to clone gnusocial sharings plugin theme' 
			 | 
		
	
		
			
			| 
				900
			 | 
			
				
			 | 
			
			
				-        exit 639253 
			 | 
		
	
		
			
			| 
				901
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				902
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				903
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/local/plugins/SharingsTheme 
			 | 
		
	
		
			
			| 
				904
			 | 
			
				
			 | 
			
			
				-    git stash 
			 | 
		
	
		
			
			| 
				905
			 | 
			
				
			 | 
			
			
				-    git checkout master 
			 | 
		
	
		
			
			| 
				906
			 | 
			
				
			 | 
			
			
				-    git branch -D $SHARINGS_THEME_COMMIT 
			 | 
		
	
		
			
			| 
				907
			 | 
			
				
			 | 
			
			
				-    git checkout $SHARINGS_THEME_COMMIT -b $SHARINGS_THEME_COMMIT 
			 | 
		
	
		
			
			| 
				908
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				909
			 | 
			
				
			 | 
			
			
				-    # enable the plugin 
			 | 
		
	
		
			
			| 
				910
			 | 
			
				
			 | 
			
			
				-    if ! grep -q "addPlugin('SharingsTheme');" /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/config.php; then 
			 | 
		
	
		
			
			| 
				911
			 | 
			
				
			 | 
			
			
				-        echo "addPlugin('SharingsTheme');" >> /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/config.php 
			 | 
		
	
		
			
			| 
				912
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				913
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				914
			 | 
			
				
			 | 
			
			
				-    cd /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				915
			 | 
			
				
			 | 
			
			
				-    php scripts/checkschema.php 
			 | 
		
	
		
			
			| 
				916
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				917
			 | 
			
				
			 | 
			
			
				-    chown -R www-data:www-data /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				918
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				919
			 | 
			
				
			 | 
			
			
				-    set_completion_param "gnusocial sharings plugin theme commit" "$SHARINGS_THEME_COMMIT" 
			 | 
		
	
		
			
			| 
				920
			 | 
			
				
			 | 
			
			
				-    install_completed gnusocial_plugin_sharings_theme 
			 | 
		
	
		
			
			| 
				921
			 | 
			
				
			 | 
			
			
				-} 
			 | 
		
	
		
			
			| 
				922
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				923
			 | 
			
				791
			 | 
			
			
				 function install_gnusocial_markdown { 
			 | 
		
	
		
			
			| 
				924
			 | 
			
				792
			 | 
			
			
				     GNUSOCIAL_PATH=/var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				925
			 | 
			
				793
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -977,8 +845,8 @@ function install_gnusocial { 
			 | 
		
	
		
			
			| 
				977
			 | 
			
				845
			 | 
			
			
				     expire_gnusocial_posts "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" "$GNUSOCIAL_EXPIRE_MONTHS" 
			 | 
		
	
		
			
			| 
				978
			 | 
			
				846
			 | 
			
			
				     install_qvitter "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" 
			 | 
		
	
		
			
			| 
				979
			 | 
			
				847
			 | 
			
			
				     install_gnusocial_markdown 
			 | 
		
	
		
			
			| 
				980
			 | 
			
				
			 | 
			
			
				-    #install_gnusocial_plugin_sharings 
			 | 
		
	
		
			
			| 
				981
			 | 
			
				
			 | 
			
			
				-    #install_gnusocial_plugin_sharings_theme 
			 | 
		
	
		
			
			| 
				
			 | 
			
				848
			 | 
			
			
				+    install_gnusocial_plugin_sharings "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				849
			 | 
			
			
				+    install_gnusocial_plugin_sharings_theme "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" 
			 | 
		
	
		
			
			| 
				982
			 | 
			
				850
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				983
			 | 
			
				851
			 | 
			
			
				     # Currently Pleroma won't install on ARM systems 
			 | 
		
	
		
			
			| 
				984
			 | 
			
				852
			 | 
			
			
				     # because it uses node-sass which doesn't support ARM 
			 |