rename source -> sources + install + conf
|
@ -11,10 +11,10 @@
|
||||||
define( 'YOURLS_DB_USER', 'yunouser' );
|
define( 'YOURLS_DB_USER', 'yunouser' );
|
||||||
|
|
||||||
/** MySQL database password */
|
/** MySQL database password */
|
||||||
define( 'YOURLS_DB_PASS', 'yunopwd' );
|
define( 'YOURLS_DB_PASS', 'yunopass' );
|
||||||
|
|
||||||
/** The name of the database for YOURLS */
|
/** The name of the database for YOURLS */
|
||||||
define( 'YOURLS_DB_NAME', 'yunouser' );
|
define( 'YOURLS_DB_NAME', 'yunobase' );
|
||||||
|
|
||||||
/** MySQL hostname.
|
/** MySQL hostname.
|
||||||
** If using a non standard port, specify it like 'hostname:port', eg. 'localhost:9999' or '127.0.0.1:666' */
|
** If using a non standard port, specify it like 'hostname:port', eg. 'localhost:9999' or '127.0.0.1:666' */
|
||||||
|
@ -57,7 +57,7 @@ define( 'YOURLS_COOKIEKEY', 'modify this text with something random' );
|
||||||
** YOURLS will auto encrypt plain text passwords in this file
|
** YOURLS will auto encrypt plain text passwords in this file
|
||||||
** Read http://yourls.org/userpassword for more information */
|
** Read http://yourls.org/userpassword for more information */
|
||||||
$yourls_user_passwords = array(
|
$yourls_user_passwords = array(
|
||||||
'username' => 'password' // You can have one or more 'login'=>'password' lines
|
'yourlsuser' => 'yourlspass' // You can have one or more 'login'=>'password' lines
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Debug mode to output some internal information
|
/** Debug mode to output some internal information
|
||||||
|
|
19
conf/nginx.conf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
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 REMOTE_USER $remote_user;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Include SSOWAT user panel.
|
||||||
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
}
|
|
@ -37,6 +37,14 @@
|
||||||
"fr": "Administrateur du site (doit être un utilisateur Yunohost existant)"
|
"fr": "Administrateur du site (doit être un utilisateur Yunohost existant)"
|
||||||
},
|
},
|
||||||
"example": "yoda"
|
"example": "yoda"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "upload_password",
|
||||||
|
"ask": {
|
||||||
|
"en": "Set the password granting upload permissions (leave empty to allow anybody to upload)",
|
||||||
|
"fr": "Choisissez le password pour autoriser l'upload (laissez vide pour autorisé tout le monde)"
|
||||||
|
},
|
||||||
|
"example": "supersecretpassword"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
path=$2
|
path=$2
|
||||||
|
admin_user=$3
|
||||||
|
upload_password=$4
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a yourls
|
sudo yunohost app checkurl $domain$path -a yourls
|
||||||
|
@ -26,8 +28,22 @@ final_path=/var/www/yourls
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
sudo cp -a ../sources/* $final_path
|
sudo cp -a ../sources/* $final_path
|
||||||
|
|
||||||
|
# Change variable in yourls configuration
|
||||||
sudo cp $final_path/user/config-sample.php $final_path/user/config.php
|
sudo cp ../conf/config.php $final_path/user/config.php
|
||||||
|
sudo sed -i "s/yunouser/$db_user/g" $final_path/user/config.php
|
||||||
|
sudo sed -i "s/yunopass/$db_pwd/g" $final_path/user/config.php
|
||||||
|
sudo sed -i "s/yunobase/$db_user/g" $final_path/user/config.php
|
||||||
|
sudo sed -i "s/yourlsuser/$admin_user/g" $final_path/user/config.php
|
||||||
|
sudo sed -i "s/yourlspass/$upload_password/g" $final_path/user/config.php
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
sudo chown -R www-data: $final_path
|
sudo chown -R www-data: $final_path
|
||||||
|
|
||||||
|
# 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/yourls.conf
|
||||||
|
|
||||||
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 54 B After Width: | Height: | Size: 54 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 42 B After Width: | Height: | Size: 42 B |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 54 B After Width: | Height: | Size: 54 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 870 B After Width: | Height: | Size: 870 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 1,007 B After Width: | Height: | Size: 1,007 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |