diff --git a/conf/nginx.conf b/conf/nginx.conf index 1d18915..8ae597e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ location PATHTOCHANGE { - alias ALIASTOCHANGE; + alias ALIASTOCHANGE/; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } @@ -9,9 +9,9 @@ location PATHTOCHANGE { location ~ ^(.+\.php)(.*)$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; } #rewrite ~ ^/.well-known/caldav PATHTOCHANGE/cal.php redirect; #rewrite ~ ^/.well-known/carddav PATHTOCHANGE/card.php redirect; @@ -19,4 +19,4 @@ location PATHTOCHANGE { location ~ ^PATHTOCHANGE/(\.ht|Core|Specific) { deny all; -} \ No newline at end of file +} diff --git a/manifest.json b/manifest.json index 570b750..dc172e5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,20 +1,27 @@ { "name": "Baikal", "id": "baikal", + "packaging_format": 1, "description": { "en": "Lightweight CalDAV+CardDAV server", "fr": "Serveur CalDAV+CardDAV léger" }, - "developer": { + "url": "http://baikal-server.com/", + "maintainer": { "name": "julien", - "email": "julien.malik@paraiso.me", - "url": "https://github.com/julienmalik" + "email": "julien.malik@paraiso.me" }, "multi_instance": "true", + "services": [ + "nginx", + "php5-fpm", + "mysql" + ], "arguments": { "install" : [ { "name": "domain", + "type": "domain", "ask": { "en": "Choose a domain for baikal" }, @@ -22,6 +29,7 @@ }, { "name": "path", + "type": "path", "ask": { "en": "Choose a path for baikal" }, @@ -30,6 +38,7 @@ }, { "name": "password", + "type": "password", "ask": { "en": "Choose a password for baikal admin" }, diff --git a/scripts/install b/scripts/install index 3afad23..b5eee0c 100644 --- a/scripts/install +++ b/scripts/install @@ -21,8 +21,8 @@ final_path=/var/www/baikal sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path sudo chown -R www-data: $final_path -sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" www-data -sudo su -c "cd $final_path && php composer.phar install" www-data +sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" -s /bin/sh www-data +sudo su -c "cd $final_path && php composer.phar install" -s /bin/sh www-data sudo rm $final_path/composer* 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') @@ -31,7 +31,7 @@ sudo yunohost app initdb $db_user -p $db_pwd -s $(readlink -e ../sources/Core/Re sudo yunohost app setting baikal mysqlpwd -v $db_pwd sed -i "s@YNH_TIMEZONE@$(cat /etc/timezone)@g" ../conf/config.php sed -i "s@YNH_ADMIN_PASSWORDHASH@$(echo -n admin:BaikalDAV:$password | md5sum | cut -d ' ' -f 1)@g" ../conf/config.php -sudo yunohost app setting baikal password -v $password +sudo yunohost app setting baikal password -v "$password" sed -i "s@YNH_LOCATION@$path@g" ../conf/config.system.php sed -i "s@YNH_DBNAME@$db_user@g" ../conf/config.system.php diff --git a/scripts/upgrade b/scripts/upgrade index 87af46c..61443f9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,8 +18,8 @@ sudo rm -rf /var/www/baikal sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path sudo chown -R www-data: $final_path -sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" www-data -sudo su -c "cd $final_path && php composer.phar install" www-data +sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" -s /bin/sh www-data +sudo su -c "cd $final_path && php composer.phar install" -s /bin/sh www-data sudo rm $final_path/composer* db_pwd=$(sudo yunohost app setting baikal mysqlpwd)