mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
Init des fichiers d'install
L'installation fonctionne mais l'authentification ldap non
This commit is contained in:
parent
5e51bcd6e9
commit
1aec759209
5 changed files with 173 additions and 23 deletions
73
conf/config.php
Normal file
73
conf/config.php
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
// Auto-refresh frequency in seconds for the public board view (60 seconds by default)
|
||||
define('BOARD_PUBLIC_CHECK_INTERVAL', 60);
|
||||
|
||||
// Board refresh frequency in seconds (the value 0 disable this feature, 10 seconds by default)
|
||||
define('BOARD_CHECK_INTERVAL', 10);
|
||||
|
||||
// Database driver: sqlite or mysql (sqlite by default)
|
||||
define('DB_DRIVER', 'mysql');
|
||||
|
||||
// Mysql username
|
||||
define('DB_USERNAME', 'yunouser');
|
||||
|
||||
// Mysql password
|
||||
define('DB_PASSWORD', 'yunopdw');
|
||||
|
||||
// Mysql hostname
|
||||
define('DB_HOSTNAME', 'localhost');
|
||||
|
||||
// Mysql database name
|
||||
define('DB_NAME', 'yunouser');
|
||||
|
||||
// Enable LDAP authentication (false by default)
|
||||
define('LDAP_AUTH', true);
|
||||
|
||||
// LDAP server hostname
|
||||
define('LDAP_SERVER', 'localhost');
|
||||
|
||||
// LDAP server port (389 by default)
|
||||
define('LDAP_PORT', 389);
|
||||
|
||||
// By default, require certificate to be verified for ldaps:// style URL. Set to false to skip the verification.
|
||||
define('LDAP_SSL_VERIFY', true);
|
||||
|
||||
// LDAP username to connect with. NULL for anonymous bind (by default).
|
||||
define('LDAP_USERNAME', null);
|
||||
|
||||
// LDAP password to connect with. NULL for anonymous bind (by default).
|
||||
define('LDAP_PASSWORD', null);
|
||||
|
||||
// LDAP account base, i.e. root of all user account
|
||||
// Example: ou=people,dc=example,dc=com
|
||||
define('LDAP_ACCOUNT_BASE', 'ou=users,dc=yunohost,dc=org');
|
||||
|
||||
// LDAP query pattern to use when searching for a user account
|
||||
// Example for ActiveDirectory: '(&(objectClass=user)(sAMAccountName=%s))'
|
||||
// Example for OpenLDAP: 'uid=%s'
|
||||
define('LDAP_USER_PATTERN', 'objectClass=uid=%s');
|
||||
|
||||
// Name of an attribute of the user account object which should be used as the full name of the user.
|
||||
define('LDAP_ACCOUNT_FULLNAME', 'displayName');
|
||||
|
||||
// Name of an attribute of the user account object which should be used as the email of the user.
|
||||
define('LDAP_ACCOUNT_EMAIL', 'mail');
|
||||
|
||||
// Enable/disable Google authentication
|
||||
define('GOOGLE_AUTH', false);
|
||||
|
||||
// Google client id (Get this value from the Google developer console)
|
||||
define('GOOGLE_CLIENT_ID', '');
|
||||
|
||||
// Google client secret key (Get this value from the Google developer console)
|
||||
define('GOOGLE_CLIENT_SECRET', '');
|
||||
|
||||
// Enable/disable GitHub authentication
|
||||
define('GITHUB_AUTH', false);
|
||||
|
||||
// GitHub client id (Copy it from your settings -> Applications -> Developer applications)
|
||||
define('GITHUB_CLIENT_ID', '');
|
||||
|
||||
// GitHub client secret key (Copy it from your settings -> Applications -> Developer applications)
|
||||
define('GITHUB_CLIENT_SECRET', '');
|
20
conf/nginx.conf
Normal file
20
conf/nginx.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
location PATHTOCHANGE {
|
||||
alias ALIASTOCHANGE;
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param AUTH_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
|
@ -1,34 +1,34 @@
|
|||
{
|
||||
name Kanboard,
|
||||
id kanboard,
|
||||
description {
|
||||
en Kanboard is a simple visual task board web application,
|
||||
fr Kanboard est une application web de management de tâches simples
|
||||
"name": "Kanboard",
|
||||
"id": "kanboard",
|
||||
"description": {
|
||||
"en": "Kanboard is a simple visual task board web application",
|
||||
"fr": "Kanboard est une application web de management de tâches simples"
|
||||
},
|
||||
developer {
|
||||
name mbugeia,
|
||||
email ,
|
||||
url
|
||||
"developer": {
|
||||
"name": "mbugeia",
|
||||
"email": "",
|
||||
"url": "http://kanboard.net/"
|
||||
},
|
||||
multi_instance true,
|
||||
arguments {
|
||||
install [
|
||||
"multi_instance": "true",
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
name domain,
|
||||
ask {
|
||||
en Choose a domain for Kanboard,
|
||||
fr Choisissez un domaine pour Kanboard
|
||||
"name": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain for Kanboard",
|
||||
"fr": "Choisissez un domaine pour Kanboard"
|
||||
},
|
||||
example domain.org
|
||||
"example": "domain.org"
|
||||
},
|
||||
{
|
||||
name path,
|
||||
ask {
|
||||
en Choose a path for Kanboard,
|
||||
fr Choisissez un chemin pour Kanboard
|
||||
"name": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for Kanboard",
|
||||
"fr": "Choisissez un chemin pour Kanboard"
|
||||
},
|
||||
example kanboard,
|
||||
default kanboard
|
||||
"example": "/kanboard",
|
||||
"default": "/kanboard"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
|
||||
# Check domain/path availability
|
||||
sudo yunohost app checkurl $domain$path -a kanboard
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate random password
|
||||
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||
|
||||
# Use 'kanboard' as database name and user
|
||||
db_user=kanboard
|
||||
|
||||
# Initialize database and store mysql password for upgrade
|
||||
sudo yunohost app initdb $db_user -p $db_pwd
|
||||
sudo yunohost app setting kanboard mysqlpwd -v $db_pwd
|
||||
|
||||
|
||||
final_path=/var/www/kanboard
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
|
||||
sudo cp ../conf/config.php $final_path
|
||||
sudo sed -i "s/yunopdw/$db_pwd/g" $final_path/config.php
|
||||
sudo sed -i "s/yunouser/$db_user/g" $final_path/config.php
|
||||
|
||||
# Set permissions to data directory
|
||||
sudo chown -R www-data:www-data $final_path/data
|
||||
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
||||
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/kanboard.conf
|
||||
|
||||
|
||||
# Reload Nginx and regenerate SSOwat conf
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
db_user=kanboard
|
||||
db_name=kanboard
|
||||
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
||||
domain=$(sudo yunohost app setting kanboard domain)
|
||||
|
||||
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
||||
sudo rm -rf /var/www/kanboard
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/kanboard.conf
|
||||
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
Loading…
Reference in a new issue