mirror of
https://github.com/YunoHost-Apps/galette_ynh.git
synced 2024-09-03 18:36:28 +02:00
Removing unused scripts, updating README
This commit is contained in:
parent
b9e74d48f6
commit
5eb92212ec
5 changed files with 8 additions and 106 deletions
15
README.md
15
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
|
||||
|
|
|
@ -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
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
Loading…
Reference in a new issue