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
ebd7f252
Commit
ebd7f252
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
function to remove hubzilla
parent
76124538
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-hubzilla
+30
-13
30 additions, 13 deletions
src/freedombone-app-hubzilla
with
30 additions
and
13 deletions
src/freedombone-app-hubzilla
+
30
−
13
View file @
ebd7f252
...
...
@@ -38,6 +38,23 @@ HUBZILLA_ADMIN_PASSWORD=
HUBZILLA_COMMIT
=
'2d79e75788aa71664a379c4cea0b6bfe3ab87ad0'
HUBZILLA_ADDONS_COMMIT
=
'67b40c7a40f328a93ee030eb15e9e1261f3cba64'
function
remove_hubzilla
{
if
!
grep
-Fxq
"install_hubzilla"
$COMPLETION_FILE
;
then
return
fi
nginx_dissite
$HUBZILLA_DOMAIN_NAME
if
[
-d
/var/www/
$HUBZILLA_DOMAIN_NAME
]
;
then
rm
-rf
/var/www/
$HUBZILLA_DOMAIN_NAME
fi
if
[
-f
/etc/nginx/sites-available/
$HUBZILLA_DOMAIN_NAME
]
;
then
rm
/etc/nginx/sites-available/
$HUBZILLA_DOMAIN_NAME
fi
function_check drop_database
drop_database hubzilla
sed
-i
'/install_hubzilla/d'
$COMPLETION_FILE
sed
-i
'/Hubzilla /d'
$COMPLETION_FILE
}
function
install_hubzilla
{
if
[[
$SYSTEM_TYPE
==
"
$VARIANT_CLOUD
"
||
$SYSTEM_TYPE
==
"
$VARIANT_MAILBOX
"
||
$SYSTEM_TYPE
==
"
$VARIANT_CHAT
"
||
$SYSTEM_TYPE
==
"
$VARIANT_WRITER
"
||
$SYSTEM_TYPE
==
"
$VARIANT_MEDIA
"
||
$SYSTEM_TYPE
==
"
$VARIANT_DEVELOPER
"
||
$SYSTEM_TYPE
==
"
$VARIANT_MESH
"
]]
;
then
return
...
...
@@ -64,14 +81,14 @@ function install_hubzilla {
return
fi
function_check install_mariadb
function_check install_mariadb
install_mariadb
function_check get_mariadb_password
get_mariadb_password
function_check get_mariadb_password
get_mariadb_password
function_check repair_databases_script
repair_databases_script
function_check repair_databases_script
repair_databases_script
apt-get
-y
install
php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
apt-get
-y
install
php5-dev imagemagick php5-imagick
...
...
@@ -120,7 +137,7 @@ function install_hubzilla {
echo
"Hubzilla onion domain:
${
HUBZILLA_ONION_HOSTNAME
}
"
>>
$COMPLETION_FILE
fi
function_check get_mariadb_hubzilla_admin_password
function_check get_mariadb_hubzilla_admin_password
get_mariadb_hubzilla_admin_password
if
[
!
$HUBZILLA_ADMIN_PASSWORD
]
;
then
if
[
-f
$IMAGE_PASSWORD_FILE
]
;
then
...
...
@@ -142,18 +159,18 @@ function install_hubzilla {
chmod
600 /home/
$MY_USERNAME
/README
fi
function_check create_database
function_check create_database
create_database hubzilla
"
$HUBZILLA_ADMIN_PASSWORD
"
if
!
grep
-q
"
$HUBZILLA_PATH
"
/etc/crontab
;
then
echo
"12,22,32,42,52 * * * * root cd
$HUBZILLA_PATH
; /usr/bin/timeout 500 /usr/bin/php include/poller.php"
>>
/etc/crontab
fi
function
check add_ddns_domain
function
check add_ddns_domain
add_ddns_domain
$HUBZILLA_DOMAIN_NAME
if
[[
$ONION_ONLY
==
"no"
]]
;
then
function_check nginx_http_redirect
function_check nginx_http_redirect
nginx_http_redirect
$HUBZILLA_DOMAIN_NAME
echo
'server {'
>>
/etc/nginx/sites-available/
$HUBZILLA_DOMAIN_NAME
echo
' listen 443 ssl;'
>>
/etc/nginx/sites-available/
$HUBZILLA_DOMAIN_NAME
...
...
@@ -301,10 +318,10 @@ function install_hubzilla {
echo
'}'
>>
/etc/nginx/sites-available/
$HUBZILLA_DOMAIN_NAME
fi
function_check configure_php
function_check configure_php
configure_php
function_check create_site_certificate
function_check create_site_certificate
create_site_certificate
$HUBZILLA_DOMAIN_NAME
'yes'
if
[
!
-d
$HUBZILLA_PATH
/view/tpl/smarty3
]
;
then
...
...
@@ -329,12 +346,12 @@ function install_hubzilla {
function_check backup_databases_script_header
backup_databases_script_header
function_check backup_database_local
function_check backup_database_local
backup_database_local hubzilla
chown
-R
www-data:www-data
$HUBZILLA_PATH
function_check nginx_ensite
function_check nginx_ensite
nginx_ensite
$HUBZILLA_DOMAIN_NAME
# initialize the database
...
...
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