1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Some fix following the use of new yunohost helpers

This commit is contained in:
mbugeia 2016-07-23 15:41:51 +02:00
parent e4e1cff6db
commit 8304519177
5 changed files with 8 additions and 11 deletions

View file

@ -8,8 +8,8 @@ listen.group = www-data
listen.mode = 0600
; Unix user/group of processes.
user = #USER#
group = #GROUP#
user = www-data
group = www-data
; Choose how the process manager will control the number of child processes.
pm = dynamic

View file

@ -19,10 +19,6 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
DESTDIR="/var/www/$app"
ynh_backup "$DESTDIR" "www"
# Copy the data directory
DATADIR="/home/yunohost.app/${app}/data"
ynh_backup "$DATADIR" "data" 1
# Copy the conf files
mkdir ./conf
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"

View file

@ -38,7 +38,7 @@ dbuser=$app
# Initialize database and store mysql password for upgrade
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
ynh_app_setting_set $app mysqlpwd $db_pwd
ynh_app_setting_set $app mysqlpwd $dbpass
ynh_app_setting_set $app adminusername $admin
ynh_app_setting_set $app is_public $is_public
@ -60,8 +60,6 @@ sudo chown -R www-data:www-data ${DESTDIR}/data
# Copy and set php-fpm configuration
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
sed -i "s@#USER#@${app}@g" ../conf/php-fpm.conf
sed -i "s@#GROUP#@${app}@g" ../conf/php-fpm.conf
sed -i "s@#POOLNAME#@${app}@g" ../conf/php-fpm.conf
sed -i "s@#DESTDIR#@${DESTDIR}/@g" ../conf/php-fpm.conf
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"

View file

@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
# Drop MySQL database and user
ynh_mysql_drop_db "$dbname" 2>/dev/null || true
ynh_mysql_drop_user "$dbuser" 2>/dev/null || true
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
# Retrieve domain from app settings
domain=$(ynh_app_setting_get "$app" domain)

View file

@ -4,6 +4,10 @@ set -eu
app="kanboard"
# Set app specific variables
dbname=$app
dbuser=$app
# Source app helpers
source /usr/share/yunohost/helpers
@ -12,7 +16,7 @@ domain=$(ynh_app_setting_get "$app" domain)
path=$(ynh_app_setting_get "$app" path)
admin=$(ynh_app_setting_get "$app" adminusername)
email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
db_pwd=$(ynh_app_setting_get "$app" mysqlpwd)
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
is_public=$(ynh_app_setting_get "$app" is_public)
if [ -z $is_public ]
then # Old version doesnt have is_public settings