diff --git a/README.md b/README.md index 27f7f34..3af19b7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ -# YunoHost example app # +Galette for Yunohost +==================== -## Usage ## -- Add application source files into `sources` subfolder. -- Edit `conf/nginx.conf` file to match application prerequisites. -- Edit manifest with application specific information. -- Edit the install, upgrade, remove, backup, restore scripts. -- Add a LICENSE file for the package. +Galette is a membership management web application towards non profit organizations. [Official website](http://galette.eu/) + +This package provides a quick and easy way to install galette (i.e. automatic MySQL base creation and configuration). +Note that the Yunohost users won't be recognized in Galette. -**More information on the documentation page:** -https://yunohost.org/packaging_apps diff --git a/scripts/backup b/scripts/backup deleted file mode 100755 index e7fe7c7..0000000 --- a/scripts/backup +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -app=ynhexample - -# The parameter $1 is the backup directory location -# which will be compressed afterward -backup_dir=$1/apps/$app -sudo mkdir -p $backup_dir - -# Backup sources & data -sudo cp -a /var/www/$app/. $backup_dir/sources - -# Copy Nginx and YunoHost parameters to make the script "standalone" -sudo cp -a /etc/yunohost/apps/$app/. $backup_dir/yunohost -domain=$(sudo yunohost app setting $app domain) -sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf $backup_dir/nginx.conf - -# If a dedicated php-fpm process is used : -# Copy dedicated php-fpm process to backup folder -# -#sudo cp -a /etc/php5/fpm/pool.d/$app.conf $backup_dir/php-fpm.conf diff --git a/scripts/remove b/scripts/remove index 0138d86..da5f5bf 100755 --- a/scripts/remove +++ b/scripts/remove @@ -2,8 +2,8 @@ app=galette db_user=galette -db_name=galett -e +db_name=galette + root_pwd=$(sudo cat /etc/yunohost/mysql) domain=$(sudo yunohost app setting galette domain) diff --git a/scripts/restore b/scripts/restore deleted file mode 100755 index df8f9bc..0000000 --- a/scripts/restore +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -app=ynhexample - -# The parameter $1 is the uncompressed restore directory location -backup_dir=$1/apps/$app - -# Restore sources & data -sudo cp -a $backup_dir/sources/. /var/www/$app - -# Restore Nginx and YunoHost parameters -sudo cp -a $backup_dir/yunohost/. /etc/yunohost/apps/$app -domain=$(sudo yunohost app setting $app domain) -sudo cp -a $backup_dir/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf - -# If a dedicated php-fpm process is used : -# Copy dedicated php-fpm process from backup folder to the right location -# And restart service -# -#sudo cp -a $backup_dir/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf -#sudo service php5-fpm reload - -# Restart webserver -sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade deleted file mode 100755 index 96c9e7c..0000000 --- a/scripts/upgrade +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -app=ynhexample - -# Retrieve arguments -domain=$(sudo yunohost app setting $app domain) -path=$(sudo yunohost app setting $app path) -admin=$(sudo yunohost app setting $app admin) -is_public=$(sudo yunohost app setting $app is_public) - -# Remove trailing "/" for next commands -path=${path%/} - -# Copy source files -final_path=/var/www/$app -sudo mkdir -p $final_path -sudo cp -a ../sources/* $final_path - -# Modify Nginx configuration file and copy it to Nginx conf directory -sed -i "s@YNH_WWW_PATH@$path@g" ../conf/nginx.conf -sed -i "s@YNH_WWW_ALIAS@$final_path/@g" ../conf/nginx.conf -# If a dedicated php-fpm process is used : -# -#sudo sed -i "s@YNH_WWW_APP@$app@g" ../conf/nginx.conf -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf - -# If a dedicated php-fpm process is used : -# Adjustment and copy dedicated php-fpm conf file -# -#sed -i "s@YNH_WWW_APP@$app@g" ../conf/php-fpm.conf -#sed -i "s@YNH_WWW_ALIAS@$final_path/@g" ../conf/php-fpm.conf -#finalphpconf=/etc/php5/fpm/pool.d/$app.conf -#sudo cp ../conf/php-fpm.conf $finalphpconf -#sudo chown root: $finalphpconf -#sudo chmod 644 $finalphpconf - -# If app is public, add url to SSOWat conf as skipped_uris -if [ "$is_public" = "Yes" ]; -then - # See install script - sudo yunohost app setting $app unprotected_uris -v "/" - # Remove old settings - sudo yunohost app setting $app skipped_uris -d -fi - -# If a dedicated php-fpm process is used : -# -#sudo service php5-fpm restart - -# Restart services -sudo service nginx reload -sudo yunohost app ssowatconf -