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
4ca60243
Commit
4ca60243
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Options to switch between qvitter and pleroma
parent
60adb3dd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-app-gnusocial
+7
-3
7 additions, 3 deletions
src/freedombone-app-gnusocial
src/freedombone-app-postactiv
+7
-3
7 additions, 3 deletions
src/freedombone-app-postactiv
src/freedombone-utils-gnusocialtools
+36
-0
36 additions, 0 deletions
src/freedombone-utils-gnusocialtools
with
50 additions
and
6 deletions
src/freedombone-app-gnusocial
+
7
−
3
View file @
4ca60243
...
...
@@ -315,11 +315,13 @@ function configure_interactive_gnusocial {
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--backtitle
$"Freedombone Control Panel"
\
--title
$"GNU Social"
\
--radiolist
$"Choose an operation:"
1
3
70
4
\
--radiolist
$"Choose an operation:"
1
5
70
6
\
1
$"Set a background image"
off
\
2
$"Set the title"
off
\
3
$"Set post expiry period (currently
$GNUSOCIAL_EXPIRE_MONTHS
months)"
off
\
4
$"Exit"
on 2>
$data
4
$"Select Qvitter user interface"
off
\
5
$"Select Pleroma user interface"
off
\
6
$"Exit"
on 2>
$data
sel
=
$?
case
$sel
in
1
)
return
;;
...
...
@@ -329,7 +331,9 @@ function configure_interactive_gnusocial {
1
)
gnusocial_set_background_image
;;
2
)
gnusocial_set_title
;;
3
)
gnusocial_set_expire_months
;;
4
)
break
;;
4
)
gnusocial_use_qvitter gnusocial
;;
5
)
gnusocial_use_pleroma gnusocial
;;
6
)
break
;;
esac
done
}
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-app-postactiv
+
7
−
3
View file @
4ca60243
...
...
@@ -313,11 +313,13 @@ function configure_interactive_postactiv {
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--backtitle
$"Freedombone Control Panel"
\
--title
$"PostActiv"
\
--radiolist
$"Choose an operation:"
1
3
70
4
\
--radiolist
$"Choose an operation:"
1
5
70
6
\
1
$"Set a background image"
off
\
2
$"Set the title"
off
\
3
$"Set post expiry period (currently
$POSTACTIV_EXPIRE_MONTHS
months)"
off
\
4
$"Exit"
on 2>
$data
4
$"Select Qvitter user interface"
off
\
5
$"Select Pleroma user interface"
off
\
6
$"Exit"
on 2>
$data
sel
=
$?
case
$sel
in
1
)
return
;;
...
...
@@ -327,7 +329,9 @@ function configure_interactive_postactiv {
1
)
postactiv_set_background_image
;;
2
)
postactiv_set_title
;;
3
)
postactiv_set_expire_months
;;
4
)
break
;;
4
)
gnusocial_use_qvitter postactiv
;;
5
)
gnusocial_use_pleroma postactiv
;;
6
)
break
;;
esac
done
}
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-gnusocialtools
+
36
−
0
View file @
4ca60243
...
...
@@ -463,4 +463,40 @@ function expire_gnusocial_posts {
fi
}
function
gnusocial_use_qvitter
{
database_name
=
$1
domain_name
=
$(
get_completion_param
"
$database_name
domain"
)
if
[
-f
/var/www/
$domain_name
/htdocs/index_qvitter.php
]
;
then
mv
/var/www/
$domain_name
/htdocs/index_qvitter.php /var/www/
$domain_name
/htdocs/index.php
fi
if
[
-f
/etc/nginx/sites-available/
$domain_name
]
;
then
sed
-i
's|index_qvitter.php|index.php|g'
/etc/nginx/sites-available/
$domain_name
sed
-i
's|index.html|index.php|g'
/etc/nginx/sites-available/
$domain_name
fi
systemctl restart nginx
}
function
gnusocial_use_pleroma
{
database_name
=
$1
domain_name
=
$(
get_completion_param
"
$database_name
domain"
)
if
[
!
-d
/var/www/
$domain_name
/htdocs/static
]
;
then
return
fi
if
[
-f
/var/www/
$domain_name
/htdocs/index.php
]
;
then
mv
/var/www/
$domain_name
/htdocs/index.php /var/www/
$domain_name
/htdocs/index_qvitter.php
fi
if
[
-f
/etc/nginx/sites-available/
$domain_name
]
;
then
sed
-i
's|index.php|index_qvitter.php|g'
/etc/nginx/sites-available/
$domain_name
sed
-i
's|index index_qvitter.php|index index.html|g'
/etc/nginx/sites-available/
$domain_name
fi
systemctl restart nginx
}
# NOTE: deliberately there is no "exit 0"
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