mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
commit
521b32a87a
2 changed files with 1 additions and 56 deletions
|
@ -16,6 +16,7 @@ demo = "https://demo.funkwhale.audio"
|
||||||
admindoc = "https://docs.funkwhale.audio/admin/index.html"
|
admindoc = "https://docs.funkwhale.audio/admin/index.html"
|
||||||
userdoc = "https://docs.funkwhale.audio/users/index.html"
|
userdoc = "https://docs.funkwhale.audio/users/index.html"
|
||||||
code = "https://dev.funkwhale.audio/funkwhale/funkwhale"
|
code = "https://dev.funkwhale.audio/funkwhale/funkwhale"
|
||||||
|
fund = "https://next.funkwhale.audio/donate/"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.1.15"
|
yunohost = ">= 11.1.15"
|
||||||
|
|
|
@ -26,62 +26,6 @@ ynh_systemd_action --action="stop" --service_name="${app}-beat" --log_path="syst
|
||||||
ynh_systemd_action --action="stop" --service_name="${app}-server" --log_path="systemd" --line_match="Stopped"
|
ynh_systemd_action --action="stop" --service_name="${app}-server" --log_path="systemd" --line_match="Stopped"
|
||||||
ynh_systemd_action --action="stop" --service_name="${app}-worker" --log_path="systemd" --line_match="Stopped"
|
ynh_systemd_action --action="stop" --service_name="${app}-worker" --log_path="systemd" --line_match="Stopped"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MOVE DATAS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# If data_dir doesn't exist, create it
|
|
||||||
if [ -z "$data_dir/" ]; then
|
|
||||||
# Do a full backup before moving datas
|
|
||||||
yunohost backup create --apps $app
|
|
||||||
|
|
||||||
data_dir="/home/yunohost.app/${app}/data"
|
|
||||||
ynh_script_progression --message="Moving datas to $data_dir..." --weight=1
|
|
||||||
|
|
||||||
mkdir -p $data_dir
|
|
||||||
mkdir -p $data_dir/{static,media,music}
|
|
||||||
|
|
||||||
chmod 750 "$data_dir"
|
|
||||||
chmod -R o-rwx "$data_dir"
|
|
||||||
chown -R $app:www-data "$data_dir"
|
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$install_dir/code/config/.env"
|
|
||||||
mkdir -p $install_dir/config
|
|
||||||
rsync -a $install_dir/code/config/ $install_dir/config/
|
|
||||||
chmod 400 $install_dir/config/.env
|
|
||||||
ynh_store_file_checksum --file="$install_dir/config/.env"
|
|
||||||
ynh_delete_file_checksum --file="$install_dir/code/config/.env"
|
|
||||||
|
|
||||||
if [ -d "$install_dir/code/data/static/" ]; then
|
|
||||||
rsync -a $install_dir/code/data/static/ $data_dir/static/
|
|
||||||
fi
|
|
||||||
if [ -d "$install_dir/media/" ]; then
|
|
||||||
rsync -a $install_dir/media/ $data_dir/media/
|
|
||||||
fi
|
|
||||||
if [ -d "$install_dir/code/data/media/" ]; then
|
|
||||||
rsync -a $install_dir/code/data/media/ $data_dir/media/
|
|
||||||
fi
|
|
||||||
if [ -d "$install_dir/import/" ]; then
|
|
||||||
rsync -a $install_dir/import/ $data_dir/music/
|
|
||||||
fi
|
|
||||||
if [ -d "$install_dir/code/data/music/" ]; then
|
|
||||||
rsync -a $install_dir/code/data/music/ $data_dir/music/
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_secure_remove --file="$install_dir/code"
|
|
||||||
ynh_secure_remove --file="$install_dir/media"
|
|
||||||
ynh_secure_remove --file="$install_dir/static"
|
|
||||||
ynh_secure_remove --file="$install_dir/code/data/media"
|
|
||||||
ynh_secure_remove --file="$install_dir/import"
|
|
||||||
ynh_secure_remove --file="$install_dir/code/data/music"
|
|
||||||
|
|
||||||
chmod 750 "$data_dir/data/"
|
|
||||||
chmod -R o-rwx "$data_dir/data/"
|
|
||||||
chown -R $app:www-data "$data_dir/data/"
|
|
||||||
|
|
||||||
upgrade_type="UPGRADE_APP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue