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:
parent
e4e1cff6db
commit
8304519177
5 changed files with 8 additions and 11 deletions
|
@ -8,8 +8,8 @@ listen.group = www-data
|
||||||
listen.mode = 0600
|
listen.mode = 0600
|
||||||
|
|
||||||
; Unix user/group of processes.
|
; Unix user/group of processes.
|
||||||
user = #USER#
|
user = www-data
|
||||||
group = #GROUP#
|
group = www-data
|
||||||
|
|
||||||
; Choose how the process manager will control the number of child processes.
|
; Choose how the process manager will control the number of child processes.
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
|
|
|
@ -19,10 +19,6 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
|
||||||
DESTDIR="/var/www/$app"
|
DESTDIR="/var/www/$app"
|
||||||
ynh_backup "$DESTDIR" "www"
|
ynh_backup "$DESTDIR" "www"
|
||||||
|
|
||||||
# Copy the data directory
|
|
||||||
DATADIR="/home/yunohost.app/${app}/data"
|
|
||||||
ynh_backup "$DATADIR" "data" 1
|
|
||||||
|
|
||||||
# Copy the conf files
|
# Copy the conf files
|
||||||
mkdir ./conf
|
mkdir ./conf
|
||||||
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"
|
||||||
|
|
|
@ -38,7 +38,7 @@ dbuser=$app
|
||||||
|
|
||||||
# Initialize database and store mysql password for upgrade
|
# Initialize database and store mysql password for upgrade
|
||||||
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
|
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 adminusername $admin
|
||||||
ynh_app_setting_set $app is_public $is_public
|
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
|
# Copy and set php-fpm configuration
|
||||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
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@#POOLNAME#@${app}@g" ../conf/php-fpm.conf
|
||||||
sed -i "s@#DESTDIR#@${DESTDIR}/@g" ../conf/php-fpm.conf
|
sed -i "s@#DESTDIR#@${DESTDIR}/@g" ../conf/php-fpm.conf
|
||||||
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
||||||
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
# Drop MySQL database and user
|
# Drop MySQL database and user
|
||||||
ynh_mysql_drop_db "$dbname" 2>/dev/null || true
|
ynh_mysql_drop_db "$dbname" 2>/dev/null || true
|
||||||
ynh_mysql_drop_user "$dbuser" 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
|
# Retrieve domain from app settings
|
||||||
domain=$(ynh_app_setting_get "$app" domain)
|
domain=$(ynh_app_setting_get "$app" domain)
|
||||||
|
|
|
@ -4,6 +4,10 @@ set -eu
|
||||||
|
|
||||||
app="kanboard"
|
app="kanboard"
|
||||||
|
|
||||||
|
# Set app specific variables
|
||||||
|
dbname=$app
|
||||||
|
dbuser=$app
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -12,7 +16,7 @@ domain=$(ynh_app_setting_get "$app" domain)
|
||||||
path=$(ynh_app_setting_get "$app" path)
|
path=$(ynh_app_setting_get "$app" path)
|
||||||
admin=$(ynh_app_setting_get "$app" adminusername)
|
admin=$(ynh_app_setting_get "$app" adminusername)
|
||||||
email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
|
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)
|
is_public=$(ynh_app_setting_get "$app" is_public)
|
||||||
if [ -z $is_public ]
|
if [ -z $is_public ]
|
||||||
then # Old version doesnt have is_public settings
|
then # Old version doesnt have is_public settings
|
||||||
|
|
Loading…
Add table
Reference in a new issue