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:
commit
1c018b9ed3
2 changed files with 11 additions and 4 deletions
|
@ -140,7 +140,6 @@ sudo chown -R www-data:www-data $final_path
|
|||
# 3 - some extra folders
|
||||
sudo mkdir -p "${final_path}/view/smarty3"
|
||||
sudo chmod -R 775 $final_path/view/smarty3
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Set up poller
|
||||
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
|
||||
(cd $final_path && sudo php bin/composer.phar install)
|
||||
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -21,6 +21,7 @@ final_path=$(ynh_app_setting_get $app final_path)
|
|||
db_name=$(ynh_app_setting_get $app db_name)
|
||||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
admin_mail=$(ynh_app_setting_get $app email)
|
||||
admin=$(ynh_app_setting_get $app admin)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
|
@ -55,6 +56,11 @@ if [ -f $final_path/.htconfig.php ]; then
|
|||
rm "$final_path/.htconfig.php"
|
||||
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
|
||||
ynh_setup_source "$final_path"
|
||||
|
||||
|
@ -84,9 +90,6 @@ sudo chmod -R 775 $final_path/view/smarty3
|
|||
# Create a system user
|
||||
ynh_system_user_create $app
|
||||
|
||||
# Set app as owner
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
|
@ -110,6 +113,9 @@ sudo cp ../conf/poller-cron /etc/cron.d/$app
|
|||
# Run composer
|
||||
(cd $final_path && sudo php bin/composer.phar install)
|
||||
|
||||
# Set app as owner
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue