Pleroma logo

This commit is contained in:
Bob Mottram 2017-11-10 17:43:51 +00:00
parent 0e099f6648
commit 4ae5bc3346
4 changed files with 138 additions and 15 deletions

View File

@ -10,11 +10,9 @@
[[file:images/logo.png]]
#+END_CENTER
#+BEGIN_EXPORT html
<center>
<h1>Pleroma</h1>
</center>
#+END_EXPORT
#+BEGIN_CENTER
[[file:images/pleroma-logo.png]]
#+END_CENTER
Pleroma is an OStatus-compatible social networking server, compatible with GNU Social, PostActiv and Mastodon. It is high-performance and so is especially well suited for running on low power single board computers without much RAM.

BIN
img/pleroma-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -62,6 +62,127 @@ pleroma_variables=(ONION_ONLY
MY_EMAIL_ADDRESS
MY_USERNAME)
function pleroma_block_domain_script {
database_name='pleroma'
pleroma_domain=$PLEROMA_DOMAIN_NAME
echo '#!/bin/bash' > /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo 'database_name=$1' >> /usr/bin/pleroma-delete-domain
echo 'remove_domain=$2' >> /usr/bin/pleroma-delete-domain
echo 'domain_name=$3' >> /usr/bin/pleroma-delete-domain
echo "POSTGRESQL_PASSWORD=\$(${PROJECT_NAME}-pass -u root -a pleroma)" >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo 'if [ ${#remove_domain} -lt 2 ]; then' >> /usr/bin/pleroma-delete-domain
echo ' echo $"No domain was specified"' >> /usr/bin/pleroma-delete-domain
echo ' exit 1' >> /usr/bin/pleroma-delete-domain
echo 'fi' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo 'if [[ "$remove_domain" != *"."* ]]; then' >> /usr/bin/pleroma-delete-domain
echo ' echo $"This doesnt look like a domain"' >> /usr/bin/pleroma-delete-domain
echo ' exit 2' >> /usr/bin/pleroma-delete-domain
echo 'fi' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo 'if [ ${#database_name} -lt 2 ]; then' >> /usr/bin/pleroma-delete-domain
echo ' echo $"No database was specified"' >> /usr/bin/pleroma-delete-domain
echo ' exit 3' >> /usr/bin/pleroma-delete-domain
echo 'fi' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo "database_query=\"select user_id from profile where profileurl like '%\${remove_domain}%';\"" >> /usr/bin/pleroma-delete-domain
echo 'declare -a ids=$(mysql -u root --password="$POSTGRESQL_PASSWORD" << EOF' >> /usr/bin/pleroma-delete-domain
echo 'use $database_name;' >> /usr/bin/pleroma-delete-domain
echo '$database_query' >> /usr/bin/pleroma-delete-domain
echo 'EOF' >> /usr/bin/pleroma-delete-domain
echo ')' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo 'ctr=0' >> /usr/bin/pleroma-delete-domain
echo 'for id in $ids' >> /usr/bin/pleroma-delete-domain
echo 'do' >> /usr/bin/pleroma-delete-domain
echo ' if [ $ctr -gt 0 ]; then' >> /usr/bin/pleroma-delete-domain
echo ' #echo "Removing user ID $id on $remove_domain"' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo " database_query=\"delete from conversation where uri like '%\${remove_domain}%';\"" >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' database_query="delete from reply where profile_id=${id};"' >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' database_query="delete from reply where replied_id=${id};"' >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' if [ $domain_name ]; then' >> /usr/bin/pleroma-delete-domain
echo ' database_query="select rendered from notice where profile_id=${id} and rendered like '"'"'%/file/%'"'"';"' >> /usr/bin/pleroma-delete-domain
echo ' declare -a stored_files=$(mysql -u root --password="$POSTGRESQL_PASSWORD" << EOF' >> /usr/bin/pleroma-delete-domain
echo 'use $database_name;' >> /usr/bin/pleroma-delete-domain
echo '$database_query' >> /usr/bin/pleroma-delete-domain
echo 'EOF' >> /usr/bin/pleroma-delete-domain
echo ')' >> /usr/bin/pleroma-delete-domain
echo -n " files_to_delete=\$(echo \"\$stored_files\" | " >> /usr/bin/pleroma-delete-domain
echo 'sed -n '"'"'s/.*href="\([^"]*\).*/\1/p'"'"' | awk -F '"'"'file/'"'"' '"'"'{print $2}'"'"')' >> /usr/bin/pleroma-delete-domain
echo ' filectr=0' >> /usr/bin/pleroma-delete-domain
echo ' for f in $files_to_delete' >> /usr/bin/pleroma-delete-domain
echo ' do' >> /usr/bin/pleroma-delete-domain
echo ' if [ $filectr -gt 0 ]; then' >> /usr/bin/pleroma-delete-domain
echo ' if $(ls /var/www/${domain_name}/htdocs/file/*${f}* 1> /dev/null 2>&1); then' >> /usr/bin/pleroma-delete-domain
echo ' rm /var/www/${domain_name}/htdocs/file/*${f}*' >> /usr/bin/pleroma-delete-domain
echo ' fi' >> /usr/bin/pleroma-delete-domain
echo ' fi' >> /usr/bin/pleroma-delete-domain
echo ' filectr=$((filectr + 1))' >> /usr/bin/pleroma-delete-domain
echo ' done' >> /usr/bin/pleroma-delete-domain
echo ' fi' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' database_query="delete from notice where profile_id=${id};"' >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' database_query="delete from profile where id=${id};"' >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo '' >> /usr/bin/pleroma-delete-domain
echo ' database_query="delete from qvitternotification where to_profile_id=${id} or from_profile_id=${id};"' >> /usr/bin/pleroma-delete-domain
echo ' mysql -u root --password="$POSTGRESQL_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/pleroma-delete-domain
echo ' fi' >> /usr/bin/pleroma-delete-domain
echo ' ctr=$((ctr + 1))' >> /usr/bin/pleroma-delete-domain
echo 'done' >> /usr/bin/pleroma-delete-domain
chmod +x /usr/bin/pleroma-delete-domain
echo '#!/bin/bash' > /usr/bin/${database_name}-firewall
echo '' >> /usr/bin/${database_name}-firewall
echo "PROJECT_NAME=$PROJECT_NAME" >> /usr/bin/${database_name}-firewall
if [[ $ONION_ONLY == 'no' ]]; then
echo "PLEROMA_DOMAIN_NAME=$PLEROMA_DOMAIN_NAME" >> /usr/bin/${database_name}-firewall
else
echo "PLEROMA_DOMAIN_NAME=$PLEROMA_ONION_HOSTNAME" >> /usr/bin/${database_name}-firewall
fi
echo "database_name=$database_name" >> /usr/bin/${database_name}-firewall
echo 'FIREWALL_DOMAINS=$HOME/${PROJECT_NAME}-firewall-domains.cfg' >> /usr/bin/${database_name}-firewall
echo '' >> /usr/bin/${database_name}-firewall
echo 'while read block; do' >> /usr/bin/${database_name}-firewall
echo ' if [[ "$block" != *"@"* ]]; then' >> /usr/bin/${database_name}-firewall
echo ' /usr/bin/pleroma-delete-domain "$database_name" "$block" "$PLEROMA_DOMAIN_NAME"' >> /usr/bin/${database_name}-firewall
echo ' else' >> /usr/bin/${database_name}-firewall
echo ' /usr/bin/pleroma-delete-user "$database_name" "$block" "$PLEROMA_DOMAIN_NAME"' >> /usr/bin/${database_name}-firewall
echo ' fi' >> /usr/bin/${database_name}-firewall
echo 'done <$FIREWALL_DOMAINS' >> /usr/bin/${database_name}-firewall
echo '' >> /usr/bin/${database_name}-firewall
echo '# remove any metadata from images uploaded in the last 2 minutes' >> /usr/bin/${database_name}-firewall
echo 'if [ -d /var/www/$PLEROMA_DOMAIN_NAME/htdocs ]; then' >> /usr/bin/${database_name}-firewall
echo ' cd /var/www/$PLEROMA_DOMAIN_NAME/htdocs' >> /usr/bin/${database_name}-firewall
echo ' declare -a recent_image=$(find file ! -name thumb-* -mmin -2 -type f -exec ls -l {} + | awk -F '"'"'file/'"'"' '"'"'{print $2}'"'"')' >> /usr/bin/${database_name}-firewall
echo ' for f in ${recent_image[@]}' >> /usr/bin/${database_name}-firewall
echo ' do' >> /usr/bin/${database_name}-firewall
echo ' if [ ${#f} -gt 1 ]; then' >> /usr/bin/${database_name}-firewall
echo ' exiftool -q -all= "file/${f}"' >> /usr/bin/${database_name}-firewall
echo ' fi' >> /usr/bin/${database_name}-firewall
echo ' done' >> /usr/bin/${database_name}-firewall
echo 'fi' >> /usr/bin/${database_name}-firewall
chmod +x /usr/bin/${database_name}-firewall
if ! grep -q "${database_name}-firewall" /etc/crontab; then
echo "*/1 * * * * root /usr/bin/${database_name}-firewall" >> /etc/crontab
fi
}
function pleroma_recompile {
# necessary after parameter changes
sudo -u pleroma mix clean

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-11-08 Wed 14:34 -->
<!-- 2017-11-10 Fri 17:42 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@ -244,9 +244,13 @@ for the JavaScript code in this tag.
</div>
</div>
<center>
<h1>Pleroma</h1>
</center>
<div class="org-center">
<div class="figure">
<p><img src="images/pleroma-logo.png" alt="pleroma-logo.png" />
</p>
</div>
</div>
<p>
Pleroma is an OStatus-compatible social networking server, compatible with GNU Social, PostActiv and Mastodon. It is high-performance and so is especially well suited for running on low power single board computers without much RAM.
@ -260,9 +264,9 @@ Pleroma is an OStatus-compatible social networking server, compatible with GNU S
</div>
</div>
<div id="outline-container-org7600aa0" class="outline-2">
<h2 id="org7600aa0">Installation</h2>
<div class="outline-text-2" id="text-org7600aa0">
<div id="outline-container-org630bbcf" class="outline-2">
<h2 id="org630bbcf">Installation</h2>
<div class="outline-text-2" id="text-org630bbcf">
<p>
Log into your system with:
</p>
@ -282,9 +286,9 @@ Select <b>Add/Remove Apps</b> then <b>pleroma</b>. You will then be asked for a
</div>
</div>
<div id="outline-container-orgf115794" class="outline-2">
<h2 id="orgf115794">Initial setup</h2>
<div class="outline-text-2" id="text-orgf115794">
<div id="outline-container-org703cfb4" class="outline-2">
<h2 id="org703cfb4">Initial setup</h2>
<div class="outline-text-2" id="text-org703cfb4">
<p>
The first thing you'll need to do is register a new account. You can set your profile details and profile image by selecting the small settings icon to the right of your name.
</p>