mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
try create secret key script on install
This commit is contained in:
parent
2a82b01c09
commit
faa5d045b2
1 changed files with 5 additions and 3 deletions
|
@ -130,12 +130,14 @@ systemctl reload nginx
|
||||||
# Change options in file config.dist.php
|
# Change options in file config.dist.php
|
||||||
# and copy in local.dist.php
|
# and copy in local.dist.php
|
||||||
#=================================================
|
#=================================================
|
||||||
|
key=$(ynh_string_random --length=8)
|
||||||
|
cp -a $final_path/config.dist.php $final_path/config.local.php
|
||||||
|
|
||||||
ynh_local_curl "page_uri"
|
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
|
||||||
echo "const WWW_URI = '$path_url/';" >> $final_path/config.local.php
|
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php"
|
||||||
# ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
|
|
||||||
# ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php"
|
# ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php"
|
||||||
# ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php"
|
# ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php"
|
||||||
|
# echo "const WWW_URI = '$path_url/';" >> $final_path/config.local.php
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue