1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00

rename source -> sources + install + conf

This commit is contained in:
Thomas LEBEAU 2014-06-13 07:30:00 +02:00
parent e9bfa87cba
commit 36db10f436
453 changed files with 49 additions and 6 deletions

View file

@ -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
View 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;
}

View file

@ -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"
} }
] ]

View file

@ -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

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 781 B

View file

Before

Width:  |  Height:  |  Size: 54 B

After

Width:  |  Height:  |  Size: 54 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 42 B

After

Width:  |  Height:  |  Size: 42 B

View file

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 587 B

View file

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

View file

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 715 B

View file

Before

Width:  |  Height:  |  Size: 54 B

After

Width:  |  Height:  |  Size: 54 B

View file

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 666 B

View file

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View file

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 88 B

View file

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 870 B

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

View file

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 450 B

View file

Before

Width:  |  Height:  |  Size: 1,007 B

After

Width:  |  Height:  |  Size: 1,007 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show more