Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
62beb7db
Commit
62beb7db
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidy gnusocial app
parent
907791dd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-gnusocial
+30
-4
30 additions, 4 deletions
src/freedombone-app-gnusocial
with
30 additions
and
4 deletions
src/freedombone-app-gnusocial
+
30
−
4
View file @
62beb7db
...
...
@@ -53,6 +53,9 @@ SHARINGS_THEME_COMMIT='7106c7ef03'
GNUSOCIAL_NSFW_REPO
=
"https://gitgud.io/ShitposterClub/SensitiveContent"
GNUSOCIAL_NSFW_COMMIT
=
'a096bbe0cfae9a9b177682920ffb58d32a48e136'
# script which causes old posts to expire
gnusocial_expire_script
=
/usr/bin/gnusocial-expire
function
install_interactive_gnusocial
{
if
[
!
$ONION_ONLY
]
;
then
ONION_ONLY
=
'no'
...
...
@@ -360,6 +363,9 @@ function remove_gnusocial {
remove_onion_service microblog
${
MICROBLOG_ONION_PORT
}
sed
-i
'/install_gnusocial/d'
$COMPLETION_FILE
sed
-i
'/GNU Social /d'
$COMPLETION_FILE
if
grep
-q
"
$gnusocial_expire_script
"
/etc/crontab
;
then
sed
-i
"/
$gnusocial_expire_script
/d"
/etc/crontab
fi
remove_app gnusocial
}
...
...
@@ -615,6 +621,10 @@ function install_gnusocial_main {
echo
$"Microblog administrator password:
$MICROBLOG_ADMIN_PASSWORD
"
>>
/home/
$MY_USERNAME
/README
chown
$MY_USERNAME
:
$MY_USERNAME
/home/
$MY_USERNAME
/README
chmod
600 /home/
$MY_USERNAME
/README
else
if
[
-f
/home/
$MY_USERNAME
/README
]
;
then
sed
-i
"s|Microblog administrator password.*|Microblog administrator password:
$MICROBLOG_ADMIN_PASSWORD
|g"
/home/
$MY_USERNAME
/README
fi
fi
if
!
grep
-q
"Microblog onion domain"
/home/
$MY_USERNAME
/README
;
then
...
...
@@ -622,10 +632,24 @@ function install_gnusocial_main {
echo
''
>>
/home/
$MY_USERNAME
/README
chown
$MY_USERNAME
:
$MY_USERNAME
/home/
$MY_USERNAME
/README
chmod
600 /home/
$MY_USERNAME
/README
else
if
[
-f
/home/
$MY_USERNAME
/README
]
;
then
sed
-i
"s|Microblog onion domain.*|Microblog onion domain:
${
MICROBLOG_ONION_HOSTNAME
}
|g"
/home/
$MY_USERNAME
/README
fi
fi
if
!
grep
-q
"GNU Social onion domain"
$COMPLETION_FILE
;
then
echo
"GNU Social onion domain:
${
MICROBLOG_ONION_HOSTNAME
}
"
>>
$COMPLETION_FILE
else
sed
-i
"s|GNU Social onion domain.*|GNU Social onion domain:
${
MICROBLOG_ONION_HOSTNAME
}
|g"
$COMPLETION_FILE
fi
if
!
grep
-q
"GNU Social domain"
$COMPLETION_FILE
;
then
echo
"GNU Social domain:
$MICROBLOG_DOMAIN_NAME
"
>>
$COMPLETION_FILE
else
sed
-i
"s|GNU Social domain.*|GNU Social domain:
$MICROBLOG_DOMAIN_NAME
|g"
$COMPLETION_FILE
fi
echo
"GNU Social onion domain:
${
MICROBLOG_ONION_HOSTNAME
}
"
>>
$COMPLETION_FILE
echo
"GNU Social domain:
$MICROBLOG_DOMAIN_NAME
"
>>
$COMPLETION_FILE
install_completed gnusocial_main
}
...
...
@@ -754,8 +778,6 @@ function expire_gnusocial_posts {
return
fi
gnusocial_expire_script
=
/usr/bin/gnusocial-expire
echo
'<?php'
>
$gnusocial_expire_script
echo
''
>>
$gnusocial_expire_script
echo
'// GNU Social post expiry script, based on StatExpire by Tony Baldwin'
>>
$gnusocial_expire_script
...
...
@@ -894,6 +916,8 @@ function install_gnusocial_theme {
if
!
grep
-q
"GNU Social theme commit"
$COMPLETION_FILE
;
then
echo
"GNU Social theme commit:
$MICROBLOG_THEME_COMMIT
"
>>
$COMPLETION_FILE
else
sed
-i
"s|GNU Social theme commit.*|GNU Social theme commit:
$MICROBLOG_THEME_COMMIT
|g"
$COMPLETION_FILE
fi
chown
-R
www-data:www-data /var/www/
$MICROBLOG_DOMAIN_NAME
/htdocs
...
...
@@ -935,6 +959,8 @@ function install_gnusocial_markdown {
if
!
grep
-q
"GNU Social Markdown commit"
$COMPLETION_FILE
;
then
echo
"GNU Social Markdown commit:
$MICROBLOG_MARKDOWN_COMMIT
"
>>
$COMPLETION_FILE
else
sed
-i
"s|GNU Social Markdown commit.*|GNU Social Markdown commit:
$MICROBLOG_MARKDOWN_COMMIT
|g"
$COMPLETION_FILE
fi
chown
-R
www-data:www-data
$MICROBLOG_PATH
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment