1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00
This commit is contained in:
Jean-Baptiste Holcroft 2019-01-08 22:17:07 +01:00
commit 5e69c99be9
3 changed files with 18 additions and 10 deletions

View file

@ -8,7 +8,7 @@
"description": {
"en": "A modern, convivial and free music server"
},
"version": "0.17.0~ynh2",
"version": "0.17.0~ynh3",
"url": "https://funkwhale.audio",
"license": "BSD-3-Clause",
"maintainer": {
@ -47,4 +47,4 @@
}
]
}
}
}

View file

@ -172,12 +172,16 @@ ynh_replace_string "__DBNAME__" "$app" "$configfile"
ynh_replace_string "__FINALPATH__" "$final_path" "$configfile"
ynh_replace_string "__KEY__" "$key" "$configfile"
cat > "$final_path/code/load_env" <<'EOL'
loadfile="$final_path/code/load_env"
cat > "$loadfile" <<'EOL'
#!/bin/bash
export $(cat "$final_path/code/config/.env" | grep -v ^# | xargs)
export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs)
EOL
chmod +x "$final_path/code/load_env"
chmod +x "$loadfile"
ynh_replace_string "__FINALPATH__" "$final_path" "$loadfile"
#=================================================
# MODIFY THE CONFIG FILE
@ -187,7 +191,7 @@ admin_mail=$(ynh_user_get_info "$admin" "mail")
(
set +o nounset
source "${final_path}/code/virtualenv/bin/activate"
source "${final_path}/code/load_env"
source "$loadfile"
set -o nounset
cd "$final_path/code/"

View file

@ -175,12 +175,16 @@ ynh_replace_string "__DBNAME__" "$app" "$configfile"
ynh_replace_string "__FINALPATH__" "$final_path" "$configfile"
ynh_replace_string "__KEY__" "$key" "$configfile"
cat > "$final_path/code/load_env" <<'EOL'
loadfile="$final_path/code/load_env"
cat > "$loadfile" <<'EOL'
#!/bin/bash
export $(cat "$final_path/code/config/.env" | grep -v ^# | xargs)
export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs)
EOL
chmod +x "$final_path/code/load_env"
chmod +x "$loadfile"
ynh_replace_string "__FINALPATH__" "$final_path" "$loadfile"
#=================================================
# MIGRATE
@ -189,7 +193,7 @@ chmod +x "$final_path/code/load_env"
(
set +o nounset
source "${final_path}/code/virtualenv/bin/activate"
source "${final_path}/code/load_env"
source "$loadfile"
set -o nounset
cd "$final_path/code"