mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
Remove sudo
This commit is contained in:
parent
da7c12e02f
commit
29d2b6e568
3 changed files with 4 additions and 5 deletions
|
@ -11,7 +11,7 @@
|
||||||
define('YOURLS_DB_USER', '__DB_NAME__');
|
define('YOURLS_DB_USER', '__DB_NAME__');
|
||||||
|
|
||||||
/** MySQL database password */
|
/** MySQL database password */
|
||||||
define('YOURLS_DB_PASS', '__DB_PASSWORD__');
|
define('YOURLS_DB_PASS', '__DB_PWD__');
|
||||||
|
|
||||||
/** The name of the database for YOURLS */
|
/** The name of the database for YOURLS */
|
||||||
define('YOURLS_DB_NAME', '__DB_NAME__');
|
define('YOURLS_DB_NAME', '__DB_NAME__');
|
||||||
|
|
|
@ -32,7 +32,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
|
@ -103,7 +102,7 @@ cp ../conf/index.php $final_path/
|
||||||
cp ../conf/config.php $final_path/user/config.php
|
cp ../conf/config.php $final_path/user/config.php
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
||||||
|
|
|
@ -126,10 +126,10 @@ ynh_script_progression --message="Modifying a config file..." --weight=2
|
||||||
# Verify the checksum and backup the file if it's different
|
# Verify the checksum and backup the file if it's different
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/user/config.php"
|
ynh_backup_if_checksum_is_different --file="$final_path/user/config.php"
|
||||||
|
|
||||||
sudo cp ../conf/config.php $final_path/user/config.php
|
cp ../conf/config.php $final_path/user/config.php
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
||||||
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
||||||
|
|
Loading…
Reference in a new issue