mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Move final path to var_www
This commit is contained in:
parent
996edf6b89
commit
ffa53e5d45
3 changed files with 8 additions and 3 deletions
|
@ -8,7 +8,7 @@ DEBUG=0
|
||||||
|
|
||||||
# define usefull variables
|
# define usefull variables
|
||||||
app="homeassistant"
|
app="homeassistant"
|
||||||
final_path="/opt/yunohost/$app"
|
final_path="/var/www/$app"
|
||||||
|
|
||||||
########## END OF CONFIGURATION ##########
|
########## END OF CONFIGURATION ##########
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
|
||||||
# definie useful vars
|
# definie useful vars
|
||||||
final_path="/opt/yunohost/$app"
|
final_path="/var/www/$app"
|
||||||
data_path="/home/yunohost.app/$app"
|
data_path="/home/yunohost.app/$app"
|
||||||
log_file="/var/log/$app/$app.log"
|
log_file="/var/log/$app/$app.log"
|
||||||
path_url="/"
|
path_url="/"
|
||||||
|
|
|
@ -16,7 +16,7 @@ port=$(ynh_app_setting_get --app="$app" --key=port)
|
||||||
|
|
||||||
# definie useful vars
|
# definie useful vars
|
||||||
if [ -z $(ynh_app_setting_get --app="$app" --key=final_path) ]; then
|
if [ -z $(ynh_app_setting_get --app="$app" --key=final_path) ]; then
|
||||||
final_path="/opt/yunohost/$app"
|
final_path="/var/www/$app"
|
||||||
data_path="/home/yunohost.app/$app"
|
data_path="/home/yunohost.app/$app"
|
||||||
log_file="/var/log/$app/$app.log"
|
log_file="/var/log/$app/$app.log"
|
||||||
path_url="/"
|
path_url="/"
|
||||||
|
@ -52,6 +52,11 @@ ynh_systemd_action --service_name="$app" --action=stop --line_match="Stopped Hom
|
||||||
|
|
||||||
# migrate to new app architecture
|
# migrate to new app architecture
|
||||||
ynh_script_progression --message="If needed, migrating to new app architecture..."
|
ynh_script_progression --message="If needed, migrating to new app architecture..."
|
||||||
|
if [ ! -d "$final_path" ]; then
|
||||||
|
# move $final_path to new directory
|
||||||
|
mv "/opt/yunohost/$app" "$final_path"
|
||||||
|
chown -R $app: "$final_path"
|
||||||
|
fi
|
||||||
if [ ! -d "$data_path" ]; then
|
if [ ! -d "$data_path" ]; then
|
||||||
# remove pip cache
|
# remove pip cache
|
||||||
ynh_secure_remove --file="/home/homeassistant/.cache"
|
ynh_secure_remove --file="/home/homeassistant/.cache"
|
||||||
|
|
Loading…
Add table
Reference in a new issue