diff options
| author | anmol26s <github@datamol.org> | 2018-12-26 11:00:48 +0530 |
|---|---|---|
| committer | anmol26s <github@datamol.org> | 2018-12-26 11:00:48 +0530 |
| commit | 209a618e52a1d908f17d97b0a1b5d40b1b014d7f (patch) | |
| tree | c446e7933d17e9dcb9335ef7867fb4b737a423ea /scripts/upgrade | |
| parent | ab60f7e6baf4bdbd4161ae56c9e1434ca0251e96 (diff) | |
| download | mastodon_ynh-209a618e52a1d908f17d97b0a1b5d40b1b014d7f.tar.gz mastodon_ynh-209a618e52a1d908f17d97b0a1b5d40b1b014d7f.tar.bz2 mastodon_ynh-209a618e52a1d908f17d97b0a1b5d40b1b014d7f.zip | |
Don't sync system folder if it don't exits while update
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index f837c9c..f1be8c1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -90,8 +90,20 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis ynh_install_nodejs 8 -# add additional package for upgrade -ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-all +# TODO: use the same mecanism with other files +ynh_install_app_dependencies \ + `# debian packages ` \ + imagemagick libpq-dev libxml2-dev libxslt1-dev file curl apt-transport-https pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev \ + `# redis ` \ + redis-server redis-tools \ + `# postgresql ` \ + postgresql postgresql-contrib \ + `# Ruby ` \ + autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev \ + `# ffmpeg from backports ` \ + ffmpeg \ + `# Yarn ` \ + yarn #================================================= # STANDARD UPGRADE STEPS @@ -109,7 +121,9 @@ yunohost service stop "$app-streaming" # Download Mastodon mv "$final_path/live" "$final_path/live_back" ynh_setup_source "$final_path/live" "app-mastodon" -rsync -a "$final_path/live_back/public/system" "$final_path/live_back/public/." +if [ -z $final_path/live_back/public/system ]; then + rsync -a "$final_path/live_back/public/system" "$final_path/live_back/public/." +fi rsync -a "$final_path/live_back/.env.production" "$final_path/live/." rm -Rf "$final_path/live_back" @@ -119,7 +133,6 @@ ynh_secure_remove $final_path/live/config/initializers/timeout.rb #================================================= # NGINX CONFIGURATION #================================================= - ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/nginx.conf" ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/nginx.conf" ynh_add_nginx_config @@ -189,6 +202,8 @@ ynh_add_systemd_config "$app-streaming" "mastodon-streaming.service" #================================================= # Add service YunoHost +ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/mastodon-web.service" +ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/mastodon-streaming.service" yunohost service add "$app-web" yunohost service add "$app-sidekiq" yunohost service add "$app-streaming" |
