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:
parent
be631555fd
commit
f7a6d6ca2d
3 changed files with 15 additions and 18 deletions
|
@ -85,12 +85,12 @@ ynh_mysql_setup_db "$db_user" "$db_name"
|
||||||
|
|
||||||
ynh_app_setting_set $app final_path "$final_path"
|
ynh_app_setting_set $app final_path "$final_path"
|
||||||
# Create tmp directory and fetch app inside
|
# Create tmp directory and fetch app inside
|
||||||
TMPDIR=$(mktemp -d)
|
tmpdir=$(mktemp -d)
|
||||||
ynh_setup_source "$TMPDIR"
|
ynh_setup_source "$tmpdir"
|
||||||
# Fetch needed plugins
|
# Fetch needed plugins
|
||||||
mkdir -p $TMPDIR/plugins/Ldap_Login
|
mkdir -p $tmpdir/plugins/Ldap_Login
|
||||||
ynh_setup_source "$TMPDIR/plugins/Ldap_Login" ldap_plugin
|
ynh_setup_source "$tmpdir/plugins/Ldap_Login" ldap_plugin
|
||||||
ynh_setup_source "$TMPDIR/plugins" log_failed_logins_plugin
|
ynh_setup_source "$tmpdir/plugins" log_failed_logins_plugin
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
@ -104,7 +104,7 @@ ynh_system_user_create $app # Create a dedicated system user
|
||||||
|
|
||||||
# Install files and set permissions
|
# Install files and set permissions
|
||||||
mkdir $final_path
|
mkdir $final_path
|
||||||
cp -a $TMPDIR/!(upload|_data) $final_path
|
cp -a $tmpdir/!(upload|_data) $final_path
|
||||||
|
|
||||||
datapath=/home/yunohost.app/$app
|
datapath=/home/yunohost.app/$app
|
||||||
mkdir -p $datapath/_data
|
mkdir -p $datapath/_data
|
||||||
|
@ -122,7 +122,6 @@ chmod 755 -R $final_path/_data
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
# Copy and set php-fpm configuration
|
# Copy and set php-fpm configuration
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
|
@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
db_name=$(ynh_app_setting_get $app db_name)
|
db_name=$(ynh_app_setting_get $app db_name)
|
||||||
domain=$(ynh_app_setting_get "$app" domain)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
|
|
|
@ -19,9 +19,9 @@ source /usr/share/yunohost/helpers
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Check destination directory
|
# Check destination directory
|
||||||
DESTDIR="/var/www/$app"
|
destdir="/var/www/$app"
|
||||||
[[ ! -d $DESTDIR ]] && ynh_die \
|
[[ ! -d $destdir ]] && ynh_die \
|
||||||
"The destination directory '$DESTDIR' does not exist.\
|
"The destination directory '$destdir' does not exist.\
|
||||||
The app is not correctly installed, you should remove it first."
|
The app is not correctly installed, you should remove it first."
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
|
@ -105,12 +105,12 @@ ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Create tmp directory and fetch app inside
|
# Create tmp directory and fetch app inside
|
||||||
TMPDIR=$(ynh_mkdir_tmp)
|
tmpdir=$(ynh_mkdir_tmp)
|
||||||
ynh_setup_source "$TMPDIR"
|
ynh_setup_source "$tmpdir"
|
||||||
# Fetch needed plugins
|
# Fetch needed plugins
|
||||||
mkdir -p $TMPDIR/plugins/Ldap_Login
|
mkdir -p $tmpdir/plugins/Ldap_Login
|
||||||
ynh_setup_source "$TMPDIR/plugins/Ldap_Login" ldap_plugin
|
ynh_setup_source "$tmpdir/plugins/Ldap_Login" ldap_plugin
|
||||||
ynh_setup_source "$TMPDIR/plugins" log_failed_logins_plugin
|
ynh_setup_source "$tmpdir/plugins" log_failed_logins_plugin
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
@ -135,7 +135,7 @@ if [ -h $final_path/galleries ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install files and set permissions
|
# Install files and set permissions
|
||||||
cp -a $TMPDIR/!(upload|_data) $final_path
|
cp -a $tmpdir/!(upload|_data) $final_path
|
||||||
|
|
||||||
|
|
||||||
# Backward compatibility:
|
# Backward compatibility:
|
||||||
|
@ -214,5 +214,4 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
systemctl restart php5-fpm
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
Loading…
Reference in a new issue