1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00

Take more official review comments into account

This commit is contained in:
Jimmy Monin 2017-10-19 21:06:34 +02:00
parent be631555fd
commit f7a6d6ca2d
3 changed files with 15 additions and 18 deletions

View file

@ -85,12 +85,12 @@ ynh_mysql_setup_db "$db_user" "$db_name"
ynh_app_setting_set $app final_path "$final_path"
# Create tmp directory and fetch app inside
TMPDIR=$(mktemp -d)
ynh_setup_source "$TMPDIR"
tmpdir=$(mktemp -d)
ynh_setup_source "$tmpdir"
# Fetch needed plugins
mkdir -p $TMPDIR/plugins/Ldap_Login
ynh_setup_source "$TMPDIR/plugins/Ldap_Login" ldap_plugin
ynh_setup_source "$TMPDIR/plugins" log_failed_logins_plugin
mkdir -p $tmpdir/plugins/Ldap_Login
ynh_setup_source "$tmpdir/plugins/Ldap_Login" ldap_plugin
ynh_setup_source "$tmpdir/plugins" log_failed_logins_plugin
#=================================================
# CREATE DEDICATED USER
@ -104,7 +104,7 @@ ynh_system_user_create $app # Create a dedicated system user
# Install files and set permissions
mkdir $final_path
cp -a $TMPDIR/!(upload|_data) $final_path
cp -a $tmpdir/!(upload|_data) $final_path
datapath=/home/yunohost.app/$app
mkdir -p $datapath/_data
@ -122,7 +122,6 @@ chmod 755 -R $final_path/_data
#=================================================
ynh_add_nginx_config
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
# Copy and set php-fpm configuration
ynh_add_fpm_config

View file

@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app db_name)
domain=$(ynh_app_setting_get "$app" domain)
#=================================================
# STANDARD REMOVE

View file

@ -19,9 +19,9 @@ source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
# Check destination directory
DESTDIR="/var/www/$app"
[[ ! -d $DESTDIR ]] && ynh_die \
"The destination directory '$DESTDIR' does not exist.\
destdir="/var/www/$app"
[[ ! -d $destdir ]] && ynh_die \
"The destination directory '$destdir' does not exist.\
The app is not correctly installed, you should remove it first."
# Retrieve arguments
@ -105,12 +105,12 @@ ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# Create tmp directory and fetch app inside
TMPDIR=$(ynh_mkdir_tmp)
ynh_setup_source "$TMPDIR"
tmpdir=$(ynh_mkdir_tmp)
ynh_setup_source "$tmpdir"
# Fetch needed plugins
mkdir -p $TMPDIR/plugins/Ldap_Login
ynh_setup_source "$TMPDIR/plugins/Ldap_Login" ldap_plugin
ynh_setup_source "$TMPDIR/plugins" log_failed_logins_plugin
mkdir -p $tmpdir/plugins/Ldap_Login
ynh_setup_source "$tmpdir/plugins/Ldap_Login" ldap_plugin
ynh_setup_source "$tmpdir/plugins" log_failed_logins_plugin
#=================================================
# CREATE DEDICATED USER
@ -135,7 +135,7 @@ if [ -h $final_path/galleries ] ; then
fi
# Install files and set permissions
cp -a $TMPDIR/!(upload|_data) $final_path
cp -a $tmpdir/!(upload|_data) $final_path
# Backward compatibility:
@ -214,5 +214,4 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
systemctl restart php5-fpm
systemctl reload nginx