mirror of
https://github.com/YunoHost-Apps/ampache_ynh.git
synced 2024-09-03 18:15:55 +02:00
Truely random secret string
This commit is contained in:
parent
aee7289358
commit
66a872ce9c
2 changed files with 3 additions and 2 deletions
|
@ -62,7 +62,7 @@ database_password = "yunopass"
|
||||||
|
|
||||||
; Cryptographic secret
|
; Cryptographic secret
|
||||||
; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want.
|
; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want.
|
||||||
secret_key = "abcdefghijklmnoprqstuvwyz0123456"
|
secret_key = "RANDOMKEYTOCHANGE"
|
||||||
|
|
||||||
; Length that a session will last expressed in seconds. Default is
|
; Length that a session will last expressed in seconds. Default is
|
||||||
; one hour.
|
; one hour.
|
||||||
|
@ -984,4 +984,3 @@ force_ssl = "true"
|
||||||
; so that the ordering is sane.
|
; so that the ordering is sane.
|
||||||
; DEFAULT: auto
|
; DEFAULT: auto
|
||||||
;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
|
;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ sudo sed -i "s/yunobase/$db_user/g" $final_path/config/ampache.cfg.php
|
||||||
sudo sed -i "s/yunoadmin/$admin_ampache/g" /tmp/admin.sql
|
sudo sed -i "s/yunoadmin/$admin_ampache/g" /tmp/admin.sql
|
||||||
sed -i "s@PATHTOCHANGE@$path@g" $final_path/config/ampache.cfg.php
|
sed -i "s@PATHTOCHANGE@$path@g" $final_path/config/ampache.cfg.php
|
||||||
sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
|
sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
|
||||||
|
random_key=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')
|
||||||
|
sed -i "s@RANDOMKEYTOCHANGE@$random_key@g" $final_path/config/ampache.cfg.php
|
||||||
|
|
||||||
# Set permissions to roundcube directory
|
# Set permissions to roundcube directory
|
||||||
sudo chown -R www-data: $final_path
|
sudo chown -R www-data: $final_path
|
||||||
|
|
Loading…
Add table
Reference in a new issue