1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Merge pull request #15 from YunoHost-Apps/testing

Fix: No admin on install and upgrade
This commit is contained in:
anmol26s 2018-11-02 20:15:48 +05:30 committed by GitHub
commit 1c018b9ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -140,7 +140,6 @@ sudo chown -R www-data:www-data $final_path
# 3 - some extra folders # 3 - some extra folders
sudo mkdir -p "${final_path}/view/smarty3" sudo mkdir -p "${final_path}/view/smarty3"
sudo chmod -R 775 $final_path/view/smarty3 sudo chmod -R 775 $final_path/view/smarty3
chown -R $app: $final_path
# Set up poller # Set up poller
ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron
@ -157,6 +156,8 @@ ynh_store_file_checksum "$final_path/config/local.ini.php"
# Run composer # Run composer
(cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo php bin/composer.phar install)
chown -R $app: $final_path
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================

View file

@ -21,6 +21,7 @@ final_path=$(ynh_app_setting_get $app final_path)
db_name=$(ynh_app_setting_get $app db_name) db_name=$(ynh_app_setting_get $app db_name)
db_pwd=$(ynh_app_setting_get $app mysqlpwd) db_pwd=$(ynh_app_setting_get $app mysqlpwd)
admin_mail=$(ynh_app_setting_get $app email) admin_mail=$(ynh_app_setting_get $app email)
admin=$(ynh_app_setting_get $app admin)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
@ -55,6 +56,11 @@ if [ -f $final_path/.htconfig.php ]; then
rm "$final_path/.htconfig.php" rm "$final_path/.htconfig.php"
fi fi
if [ -z $admin_mail ]; then # If admin_mail setting doesn't exist
admin_mail=$(sudo yunohost user info $admin | grep "mail:" | cut -d' ' -f2)
ynh_app_setting_set $app email $admin_mail
fi
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path" ynh_setup_source "$final_path"
@ -84,9 +90,6 @@ sudo chmod -R 775 $final_path/view/smarty3
# Create a system user # Create a system user
ynh_system_user_create $app ynh_system_user_create $app
# Set app as owner
chown -R $app: $final_path
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
@ -110,6 +113,9 @@ sudo cp ../conf/poller-cron /etc/cron.d/$app
# Run composer # Run composer
(cd $final_path && sudo php bin/composer.phar install) (cd $final_path && sudo php bin/composer.phar install)
# Set app as owner
chown -R $app: $final_path
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================