mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
removing sudo
! [YEP-2.12] You should not need to use 'sudo', the script is being run as root. (If you need to run a command using a specific user, use 'ynh_exec_as')
This commit is contained in:
parent
9511b6070f
commit
86722409f6
2 changed files with 6 additions and 6 deletions
|
@ -117,7 +117,7 @@ ynh_print_info --message="Configuring Kimai2..."
|
|||
|
||||
local_conf="$final_path/config/packages/local.yaml"
|
||||
# Configure registration
|
||||
sudo cp ../conf/local.yaml $local_conf
|
||||
cp ../conf/local.yaml $local_conf
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf"
|
||||
if [ $registration -eq 1 ]
|
||||
then
|
||||
|
@ -130,7 +130,7 @@ env_conf="$final_path/.env"
|
|||
# Configure environement
|
||||
if [ "$database" = "mysql" ]; then
|
||||
# setup application config
|
||||
sudo cp ../conf/.env.mysql $env_conf
|
||||
cp ../conf/.env.mysql $env_conf
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
|
@ -142,7 +142,7 @@ if [ "$database" = "mysql" ]; then
|
|||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf"
|
||||
else
|
||||
# setup application config
|
||||
sudo cp ../conf/.env.sqlite $env_conf
|
||||
cp ../conf/.env.sqlite $env_conf
|
||||
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
||||
fi
|
||||
|
|
|
@ -168,7 +168,7 @@ ynh_print_info --message="Configuring Kimai2..."
|
|||
|
||||
local_conf="$final_path/config/packages/local.yaml"
|
||||
ynh_backup_if_checksum_is_different --file="$local_conf"
|
||||
sudo cp ../conf/local.yaml $local_conf
|
||||
cp ../conf/local.yaml $local_conf
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf"
|
||||
if [ $registration -eq 1 ]
|
||||
then
|
||||
|
@ -183,7 +183,7 @@ ynh_backup_if_checksum_is_different --file="$env_conf"
|
|||
# Configure environement
|
||||
if [ "$database" = "mysql" ]; then
|
||||
# setup application config
|
||||
sudo cp ../conf/.env.mysql $env_conf
|
||||
cp ../conf/.env.mysql $env_conf
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
|
@ -194,7 +194,7 @@ if [ "$database" = "mysql" ]; then
|
|||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf"
|
||||
else
|
||||
# setup application config
|
||||
sudo cp ../conf/.env.sqlite $env_conf
|
||||
cp ../conf/.env.sqlite $env_conf
|
||||
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue