mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
commit
ef9b804315
11 changed files with 43 additions and 37 deletions
34
README.md
34
README.md
|
@ -1,25 +1,25 @@
|
||||||
# YunoHost App for Hubzilla Hub
|
# YunoHost App for Hubzilla Hub
|
||||||
|
|
||||||
## Hubzilla
|
## Hubzilla
|
||||||
[Hubzilla](http://hubzilla.org) is a powerful platform for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.
|
[Hubzilla](http://hubzilla.org) is a powerful platform for creating interconnected websites featuring a decentralized identity, commuhubzilla_test1nications, and permissions framework built using common webserver technology.
|
||||||
|
|
||||||
|
|
||||||
Current snapshot in *sources*:
|
Current snapshot in *sources*:
|
||||||
|
|
||||||
* https://github.com/redmatrix/hubzilla: 2.0 (commit c2830c4a98cf3c9983b3c4b61024d52a6d7187df)
|
* https://github.com/redmatrix/hubzilla: 2.4.2 (commit 8896ebf7cbf20c242399c3821be5881e6068175a)
|
||||||
* https://github.com/redmatrix/hubzilla-addons: 2.0 (commit 7cdd80991a517f318207223e0d5622f5535f476c)
|
* https://github.com/redmatrix/hubzilla-addons: 2.4.2 (commit 30f3104ebe2121a433d174bb3bcb703bb9787bd3)
|
||||||
|
|
||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
Before installing, read the [Hubzilla installation instructions](https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt) for important information about
|
Before installing, read the [Hubzilla installation instructions](https://github.com/redmatrix/hubzilla/blob/master/install/INSTALL.txt) for important information about
|
||||||
|
|
||||||
- SSL certificate validation requirement (now with support for [Let's Encrypt!](https://letsencrypt.org)). See Installation section below.
|
- SSL certificate validation requirement (now with support for [Let's Encrypt!](https://letsencrypt.org)). See Installation section below.
|
||||||
- Dedicated domain (must install under web root like **https://hub.example.com/** not **https://example.com/hub/** )
|
- Dedicated domain (must install under web root like **https://hub.example.com/** not **https://example.com/hub/** )
|
||||||
- Required packages (all of these are not yet installed by this YunoHost installer package). This YunoHost package installs the following additional packages:
|
- Required packages (all of these are not yet installed by this YunoHost installer package). This YunoHost package installs the following additional packages:
|
||||||
- php5-cli
|
- php5-cli
|
||||||
- php5-imagick
|
- php5-imagick
|
||||||
- php5-gd
|
- php5-gd
|
||||||
- php5-mcrypt
|
- php5-mcrypt
|
||||||
- This package requires a **system-wide change to php.ini** that enables the `exec()` perimission. [See the PHP manual for more information](php.net/manual/function.exec.php).
|
- This package requires a **system-wide change to php.ini** that enables the `exec()` perimission. [See the PHP manual for more information](php.net/manual/function.exec.php).
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,10 +31,10 @@ Hubzilla requires a dedicated domain, so obtain one and add it using the [YunoHo
|
||||||
|
|
||||||
Hubzilla requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual.
|
Hubzilla requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual.
|
||||||
|
|
||||||
#### YunoHost >= 2.5 :
|
#### YunoHost >= 2.5 :
|
||||||
Once the dedicated domain has been added to YunoHost, go again to the admin panel, go to domains then select your domain and click on "Install Let's Encrypt certificate".
|
Once the dedicated domain has been added to YunoHost, go again to the admin panel, go to domains then select your domain and click on "Install Let's Encrypt certificate".
|
||||||
|
|
||||||
#### Yunohost < 2.5 :
|
#### Yunohost < 2.5 :
|
||||||
For older versions of YunoHost, once you have added the new domain, SSH into your YunoHost server and perform the following steps:
|
For older versions of YunoHost, once you have added the new domain, SSH into your YunoHost server and perform the following steps:
|
||||||
|
|
||||||
1. Install [certbot](https://certbot.eff.org/) to make installing free SSL certificates from Let's Encrypt simple.
|
1. Install [certbot](https://certbot.eff.org/) to make installing free SSL certificates from Let's Encrypt simple.
|
||||||
|
@ -42,20 +42,20 @@ For older versions of YunoHost, once you have added the new domain, SSH into you
|
||||||
1. Stop nginx
|
1. Stop nginx
|
||||||
|
|
||||||
service nginx stop
|
service nginx stop
|
||||||
|
|
||||||
1. Run the **certbot** utility with the **certonly** option
|
1. Run the **certbot** utility with the **certonly** option
|
||||||
|
|
||||||
certbot certonly
|
certbot certonly
|
||||||
|
|
||||||
1. Copy the generated certificate and key into the appropriate location for YunoHost to use
|
1. Copy the generated certificate and key into the appropriate location for YunoHost to use
|
||||||
|
|
||||||
cp /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem /etc/yunohost/certs/YOUR_DOMAIN/crt.pem
|
cp /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem /etc/yunohost/certs/YOUR_DOMAIN/crt.pem
|
||||||
cp /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem /etc/yunohost/certs/YOUR_DOMAIN/key.pem
|
cp /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem /etc/yunohost/certs/YOUR_DOMAIN/key.pem
|
||||||
|
|
||||||
1. Restart nginx
|
1. Restart nginx
|
||||||
|
|
||||||
service nginx start
|
service nginx start
|
||||||
|
|
||||||
### Install the Hubzilla application
|
### Install the Hubzilla application
|
||||||
Use the [YunoHost admin](https://reticu.li/yunohost/admin) panel to install Hubzilla by entering the GitHub repo address in the custom app URL
|
Use the [YunoHost admin](https://reticu.li/yunohost/admin) panel to install Hubzilla by entering the GitHub repo address in the custom app URL
|
||||||
|
|
||||||
|
@ -64,3 +64,5 @@ Use the [YunoHost admin](https://reticu.li/yunohost/admin) panel to install Hubz
|
||||||
Make sure to select your domain from the previous section as the application domain. Also set the application to Public.
|
Make sure to select your domain from the previous section as the application domain. Also set the application to Public.
|
||||||
|
|
||||||
When installation is complete, you will need to visit your new hub and register a new account using the email address you specified in the app installation form. You should then be able to log in and create your first channel.
|
When installation is complete, you will need to visit your new hub and register a new account using the email address you specified in the app installation form. You should then be able to log in and create your first channel.
|
||||||
|
<strong>If above method do not work for you then you have give an account administrator access through phpMYAdmin by
|
||||||
|
adding 4096 to the account_roles for that account in the database.</strong>
|
||||||
|
|
7
conf/ldap_conf.php
Normal file
7
conf/ldap_conf.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
App::$config['system']['addon'] = 'ldapauth';
|
||||||
|
|
||||||
|
App::$config['ldapauth']['ldap_server'] = 'localhost';
|
||||||
|
App::$config['ldapauth']['ldap_searchdn'] = 'ou=users,dc=yunohost,dc=org';
|
||||||
|
App::$config['ldapauth']['ldap_userattr'] = 'uid';
|
||||||
|
App::$config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail';
|
||||||
|
App::$config['ldapauth']['create_account'] = '1';
|
|
@ -85,7 +85,9 @@ sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php
|
||||||
sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php
|
sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php
|
||||||
sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php
|
sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php
|
||||||
sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php
|
sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php
|
||||||
sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php
|
sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php
|
||||||
|
# addon ldap config
|
||||||
|
sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php"
|
||||||
|
|
||||||
# Set www-data to owner
|
# Set www-data to owner
|
||||||
sudo chown -R www-data:www-data $final_path
|
sudo chown -R www-data:www-data $final_path
|
||||||
|
@ -132,4 +134,3 @@ sudo service php5-fpm reload || true
|
||||||
sudo service nginx reload || true
|
sudo service nginx reload || true
|
||||||
|
|
||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
||||||
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
|
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
|
||||||
|
|
||||||
# Remove poller cron job
|
# Remove poller cron job
|
||||||
sudo rm -f /etc/cron.d/poller-cron
|
sudo rm -f /etc/cron.d/$app
|
||||||
|
|
||||||
# Restore php.ini as it was before installing hubzilla
|
# Restore php.ini as it was before installing hubzilla
|
||||||
if [ "$run_exec" = "Yes" ];
|
if [ "$run_exec" = "Yes" ];
|
||||||
|
|
|
@ -21,6 +21,11 @@ run_exec=$(ynh_app_setting_get $app run_exec)
|
||||||
|
|
||||||
CHECK_PATH # Vérifie et corrige la syntaxe du path.
|
CHECK_PATH # Vérifie et corrige la syntaxe du path.
|
||||||
|
|
||||||
|
# Make backup of old app folder and create again the app folder
|
||||||
|
sudo mv ${final_path} ${final_path}.old
|
||||||
|
sudo mkdir -p $final_path
|
||||||
|
|
||||||
|
|
||||||
# We download the sources and check the md5sum
|
# We download the sources and check the md5sum
|
||||||
# 1 - hubzilla
|
# 1 - hubzilla
|
||||||
hubzilla_file=`sudo cat ../sources/hubzilla/source_file`;
|
hubzilla_file=`sudo cat ../sources/hubzilla/source_file`;
|
||||||
|
@ -28,6 +33,9 @@ sudo wget -nv -i ../sources/hubzilla/source_url -O ${hubzilla_file}.zip
|
||||||
sudo md5sum -c ../sources/hubzilla/source_md5 --status || (echo "Corrupt source" >&2 && false)
|
sudo md5sum -c ../sources/hubzilla/source_md5 --status || (echo "Corrupt source" >&2 && false)
|
||||||
sudo unzip -q ${hubzilla_file}.zip -d ../sources/hubzilla/
|
sudo unzip -q ${hubzilla_file}.zip -d ../sources/hubzilla/
|
||||||
sudo cp -r ../sources/hubzilla/${hubzilla_file}/. $final_path
|
sudo cp -r ../sources/hubzilla/${hubzilla_file}/. $final_path
|
||||||
|
sudo cp -a ${final_path}.old/store ${final_path}
|
||||||
|
sudo cp -a ${final_path}.old/.htconfig.php ${final_path}
|
||||||
|
sudo rm -Rf ${final_path}.old
|
||||||
|
|
||||||
# 2 - Addons
|
# 2 - Addons
|
||||||
addons_file=`sudo cat ../sources/hubzilla-addons/source_file`;
|
addons_file=`sudo cat ../sources/hubzilla-addons/source_file`;
|
||||||
|
@ -38,20 +46,9 @@ sudo mkdir $final_path/addon
|
||||||
sudo cp -r ../sources/hubzilla-addons/${addons_file}/. $final_path/addon
|
sudo cp -r ../sources/hubzilla-addons/${addons_file}/. $final_path/addon
|
||||||
|
|
||||||
# 3 - some extra folders
|
# 3 - some extra folders
|
||||||
sudo mkdir -p "${final_path}/store/[data]/smarty3"
|
|
||||||
sudo chmod -R 777 $final_path/store
|
sudo chmod -R 777 $final_path/store
|
||||||
|
|
||||||
# Copy the template install/htconfig.sample.php to .htconfig.php
|
|
||||||
sudo cp $final_path/install/htconfig.sample.php $final_path/.htconfig.php
|
|
||||||
|
|
||||||
# Use sed to add the database information to .htconfig.php
|
|
||||||
sudo sed -i "s/your.mysqlhost.com/localhost/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/mysqlpassword/$db_pwd/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php
|
|
||||||
sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php
|
|
||||||
|
|
||||||
# Set www-data to owner
|
# Set www-data to owner
|
||||||
sudo chown -R www-data:www-data $final_path
|
sudo chown -R www-data:www-data $final_path
|
||||||
|
@ -95,4 +92,3 @@ fi
|
||||||
sudo service php5-fpm reload || true
|
sudo service php5-fpm reload || true
|
||||||
sudo service nginx reload || true
|
sudo service nginx reload || true
|
||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
hubzilla-addons-2.0
|
hubzilla-addons-2.4.2
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
09278c5123db1bbb5546c659177ecce5 hubzilla-addons-2.0.zip
|
24cde04ec71c61864e0ce904a27ad432 hubzilla-addons-2.4.2.zip
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://github.com/redmatrix/hubzilla-addons/archive/2.0.zip
|
https://github.com/redmatrix/hubzilla-addons/archive/2.4.2.zip
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
hubzilla-2.0
|
hubzilla-2.4.2
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
eb60bc48b04451af692af5ec4770066f hubzilla-2.0.zip
|
779d29162c3e7635bc1c93707c3da67f hubzilla-2.4.2.zip
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://github.com/redmatrix/hubzilla/archive/2.0.zip
|
https://github.com/redmatrix/hubzilla/archive/2.4.2.zip
|
||||||
|
|
Loading…
Add table
Reference in a new issue