mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
add hooks to copy file config.dist.php in config.local.php with good options
This commit is contained in:
parent
5245009c35
commit
f17a3c490f
3 changed files with 13 additions and 12 deletions
|
@ -6,15 +6,16 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ../scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# Change options in config.local.php
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin;" --target_file="$final_path/config.dist.php"
|
||||
ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = false;" --target_file="$final_path/config.dist.php"
|
||||
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/garradin/';" --target_file="$final_path/config.dist.php"
|
||||
sudo cp -a /var/www/garradin/config.dist.php var/www/garradin/local.dist.php
|
||||
|
||||
sudo cp -a $final_path/config.dist.php $final_path/local.dist.php
|
||||
ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin;" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = false;" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/garradin/';" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = 'uqn8jvlmVZLn988lOZiHd1z97hD36V40AnE0LLqLY1801LG3caO';" --target_file="$final_path/config.dist.php"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ../scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -14,9 +14,9 @@ source /usr/share/yunohost/helpers
|
|||
# and copy in local.dist.php
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin;" --target_file="$final_path/config.dist.php"
|
||||
ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = false;" --target_file="$final_path/config.dist.php"
|
||||
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/garradin/';" --target_file="$final_path/config.dist.php"
|
||||
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = 'uqn8jvlmVZLn988lOZiHd1z97hD36V40AnE0LLqLY1801LG3caO';" --target_file="$final_path/config.dist.php"
|
||||
sudo cp -a /var/www/garradin/config.dist.php var/www/garradin/local.dist.php
|
||||
|
||||
sudo cp -a $final_path/config.dist.php $final_path/local.dist.php
|
||||
ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin;" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = false;" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/garradin/';" --target_file="$final_path/local.dist.php"
|
||||
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = 'uqn8jvlmVZLn988lOZiHd1z97hD36V40AnE0LLqLY1801LG3caO';" --target_file="$final_path/config.dist.php"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ../scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue