diff --git a/scripts/_common.sh b/scripts/_common.sh index 0382e12..75dd647 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,8 +15,9 @@ apt-transport-https \ xvfb cutycapt xauth \ duplicity \ at \ -php-curl php-gd php-imap php-xml php-soap php-xmlrpc php-common php-dev php-zip php-ssh2 php-mbstring php-ldap \ +php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-gd php$YNH_DEFAULT_PHP_VERSION-imap php$YNH_DEFAULT_PHP_VERSION-xml php$YNH_DEFAULT_PHP_VERSION-soap php$YNH_DEFAULT_PHP_VERSION-xmlrpc php$YNH_DEFAULT_PHP_VERSION-common php$YNH_DEFAULT_PHP_VERSION-dev php$YNH_DEFAULT_PHP_VERSION-zip php$YNH_DEFAULT_PHP_VERSION-ssh2 php$YNH_DEFAULT_PHP_VERSION-mbstring php$YNH_DEFAULT_PHP_VERSION-ldap \ ffmpeg" + # ntp usb-modeswitch python-serial extra_pkg_dependencies="libsox-fmt-mp3 sox libttspico-utils \ espeak \ diff --git a/scripts/install b/scripts/install index 31c964b..a4ef069 100644 --- a/scripts/install +++ b/scripts/install @@ -92,14 +92,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -109,6 +101,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= @@ -118,7 +118,7 @@ ynh_script_progression --message="Configuring rights..." # Create tmp required by Jeedom mkdir -p /tmp/jeedom -chmod 777 -R /tmp/jeedom +chmod 750 -R /tmp/jeedom chown www-data:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices @@ -175,11 +175,11 @@ ynh_mysql_execute_file_as_root --file="../conf/config.sql" --database=$db_name ynh_script_progression --message="Securing files and directories..." # Set permissions to app files -chmod 775 -R $final_path +chmod 750 -R $final_path chown -R www-data:www-data $final_path # Create tmp required by Jeedom -chmod 777 -R /tmp/jeedom +chmod 750 -R /tmp/jeedom chown www-data:www-data -R /tmp/jeedom #================================================= diff --git a/scripts/restore b/scripts/restore index 93ccbb0..4cca4af 100644 --- a/scripts/restore +++ b/scripts/restore @@ -96,7 +96,7 @@ ynh_script_progression --message="Configuring rights..." # Create tmp required by Jeedom mkdir -p /tmp/jeedom -chmod 777 -R /tmp/jeedom +chmod 750 -R /tmp/jeedom chown www-data:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices diff --git a/scripts/upgrade b/scripts/upgrade index fb63f4e..5307c92 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,8 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) sudo=$(ynh_app_setting_get --app=$app --key=sudo) #================================================= @@ -121,7 +123,7 @@ ynh_script_progression --message="Configuring rights..." # Create tmp required by Jeedom mkdir -p /tmp/jeedom -chmod 777 -R /tmp/jeedom +chmod 750 -R /tmp/jeedom chown www-data:www-data -R /tmp/jeedom # For nginx user to be able to communicate with home automation devices @@ -178,11 +180,11 @@ ynh_add_config --template="cronjeedom_watchdog" --destination="/etc/cron.d/${app ynh_script_progression --message="Securing files and directories..." # Set permissions to app files -chmod 775 -R $final_path +chmod 750 -R $final_path chown -R www-data:www-data $final_path # Create tmp required by Jeedom -chmod 777 -R /tmp/jeedom +chmod 750 -R /tmp/jeedom chown www-data:www-data -R /tmp/jeedom #=================================================