mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
Merge pull request #7 from YunoHost-Apps/vFriendica_2018.05
V friendica 2018.05
This commit is contained in:
commit
9b6c75a660
5 changed files with 15 additions and 21 deletions
|
@ -1,2 +1,2 @@
|
||||||
# Run poller periodically to update Hubzilla
|
# Run poller periodically to update Friendica
|
||||||
*/10 * * * * cd YNH_WWW_PATH; /usr/bin/php bin/worker.php
|
*/10 * * * * __USER__ cd __YNH_WWW_PATH__; /usr/bin/php bin/worker.php
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"name": "aymhce",
|
"name": "aymhce",
|
||||||
"email": "aymhce@gmail.com"
|
"email": "aymhce@gmail.com"
|
||||||
},
|
},
|
||||||
"multi_instance": "true",
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php5-fpm",
|
"php5-fpm",
|
||||||
|
|
|
@ -70,11 +70,8 @@ ynh_app_setting_set $app database $database
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
pkg_dependencies="php5-cli php5-imagick php5-gd php5-mcrypt"
|
ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)'
|
||||||
if [ "$(lsb_release --codename --short)" != "jessie" ]; then
|
|
||||||
pkg_dependencies="$pkg_dependencies php-xml"
|
|
||||||
fi
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
|
@ -107,7 +104,8 @@ ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
||||||
# configure friendica
|
# configure friendica
|
||||||
sudo cp "/var/www/$app/htconfig.php" "/var/www/$app/.htconfig.php"
|
|
||||||
|
sudo cp "$final_path/htconfig.php" "$final_path/.htconfig.php"
|
||||||
ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/.htconfig.php"
|
ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/.htconfig.php"
|
||||||
ynh_replace_string "mysqlusername" "$db_name" "$final_path/.htconfig.php"
|
ynh_replace_string "mysqlusername" "$db_name" "$final_path/.htconfig.php"
|
||||||
ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/.htconfig.php"
|
ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/.htconfig.php"
|
||||||
|
@ -146,7 +144,8 @@ sudo chmod -R 777 $final_path/view/smarty3
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
# Set up poller
|
# Set up poller
|
||||||
sed -i "s@YNH_WWW_PATH@$final_path@g" ../conf/poller-cron
|
ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron
|
||||||
|
ynh_replace_string "__USER__" "$app" ../conf/poller-cron
|
||||||
sudo cp ../conf/poller-cron /etc/cron.d/$app
|
sudo cp ../conf/poller-cron /etc/cron.d/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -80,11 +80,8 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini"
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
pkg_dependencies="php5-cli php5-imagick php5-gd php5-mcrypt"
|
ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)'
|
||||||
if [ "$(lsb_release --codename --short)" != "jessie" ]; then
|
|
||||||
pkg_dependencies="$pkg_dependencies php-xml"
|
|
||||||
fi
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
# set permission
|
# set permission
|
||||||
sudo chmod -R 777 $final_path/view/smarty3
|
sudo chmod -R 777 $final_path/view/smarty3
|
||||||
|
|
|
@ -33,11 +33,8 @@ ynh_clean_setup () {
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Add Dependencies
|
# Add Dependencies
|
||||||
pkg_dependencies="php5-cli php5-imagick php5-gd php5-mcrypt"
|
ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)'
|
||||||
if [ "$(lsb_release --codename --short)" != "jessie" ]; then
|
|
||||||
pkg_dependencies="$pkg_dependencies php-xml"
|
|
||||||
fi
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
|
@ -100,7 +97,8 @@ ynh_backup_if_checksum_is_different "$final_path/.htconfig.php"
|
||||||
ynh_store_file_checksum "$final_path/.htconfig.php"
|
ynh_store_file_checksum "$final_path/.htconfig.php"
|
||||||
|
|
||||||
# Set up poller
|
# Set up poller
|
||||||
sed -i "s@YNH_WWW_PATH@$final_path@g" ../conf/poller-cron
|
ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron
|
||||||
|
ynh_replace_string "__USER__" "$app" ../conf/poller-cron
|
||||||
sudo cp ../conf/poller-cron /etc/cron.d/$app
|
sudo cp ../conf/poller-cron /etc/cron.d/$app
|
||||||
|
|
||||||
# Run composer
|
# Run composer
|
||||||
|
|
Loading…
Reference in a new issue