diff --git a/conf/nginx.conf b/conf/nginx.conf index ac20e00..9725542 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,7 +11,7 @@ location PATHTOCHANGE { client_max_body_size 30m; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php5-fpm-spip.sock; fastcgi_index spip.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/conf/nginx.conf-public b/conf/nginx.conf-public index f92f13b..631d2df 100644 --- a/conf/nginx.conf-public +++ b/conf/nginx.conf-public @@ -8,7 +8,7 @@ location PATHTOCHANGE { client_max_body_size 30m; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php5-fpm-spip.sock; fastcgi_index spip.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/manifest.json b/manifest.json index 30920fc..4dfd61e 100644 --- a/manifest.json +++ b/manifest.json @@ -11,6 +11,7 @@ "email": "cyp@rouquin.me", "url": "http://rouquin.me" }, + "url": "http://www.spip.net/", "multi_instance": "true", "arguments": { "install" : [ diff --git a/scripts/install b/scripts/install index 1ee7c70..fc36364 100644 --- a/scripts/install +++ b/scripts/install @@ -1,6 +1,21 @@ +#!/bin/bash + # Retrieve arguments domain=$1 path=$2 +admin_spip=$3 +language=$4 +is_public=$5 + +# Check if admin exists +sudo yunohost user list --json | grep -q "\"username\": \"$admin_spip\"" +if [[ ! $? -eq 0 ]]; then + echo "Wrong admin" + exit 1 +fi +sudo yunohost app setting spip admin -v $admin_spip +sudo yunohost app setting spip language -v $language +sudo yunohost app setting spip is_public -v $is_public # Check domain/path availability sudo yunohost app checkurl $domain$path -a spip @@ -9,10 +24,9 @@ if [[ ! $? -eq 0 ]]; then fi # Generate random DES key & password -deskey=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') 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 'roundcube' as database name and user +# Use 'spip' as database name and user db_user=spip # Initialize database and store mysql password for upgrade @@ -33,4 +47,5 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/spip.conf # Reload Nginx and regenerate SSOwat conf sudo service nginx reload +sudo yunohost app setting spip skipped_uris -v "/" sudo yunohost app ssowatconf \ No newline at end of file