1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Reorder SystemD

This commit is contained in:
Yalh 2019-01-24 02:19:00 +01:00 committed by yalh76
parent ffed31d8af
commit 519bcb9513
3 changed files with 25 additions and 15 deletions

View file

@ -392,6 +392,12 @@ fi
systemctl reload nginx systemctl reload nginx
#=================================================
# START SERVICE
#=================================================
yunohost service start $app
#================================================= #=================================================
# SEND A README FOR THE ADMIN # SEND A README FOR THE ADMIN
#================================================= #=================================================

View file

@ -118,18 +118,19 @@ sudo rm erlang_solutions.asc
# install dependencies # install dependencies
ynh_install_app_dependencies git build-essential postgresql postgresql-contrib openssl g++ apt-transport-https erlang-inets elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools ynh_install_app_dependencies git build-essential postgresql postgresql-contrib openssl g++ apt-transport-https erlang-inets elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add $app --description "$app daemon for Pleroma" --log "/var/log/$app/$app.log"
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================
ynh_restore_file "/etc/systemd/system/$app.service" ynh_restore_file "/etc/systemd/system/$app.service"
systemctl enable $app.service systemctl enable $app.service
systemctl daemon-reload
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add $app --description "$app daemon for Pleroma" --log "/var/log/$app/$app.log"
#================================================= #=================================================
# RESTORE THE CRON FILE # RESTORE THE CRON FILE
@ -151,7 +152,8 @@ ynh_restore_file "/etc/logrotate.d/$app"
systemctl reload nginx systemctl reload nginx
systemctl enable "$app" #=================================================
systemctl start "$app" # START SERVICE
# App needs time to start #=================================================
sleep 10
yunohost service start $app

View file

@ -69,7 +69,7 @@ ynh_clean_setup () {
ynh_abort_if_errors ynh_abort_if_errors
# Stop Pleroma for upgrade # Stop Pleroma for upgrade
systemctl stop "$app" yunohost service stop "$app"
#================================================= #=================================================
# CHECK THE PATH # CHECK THE PATH
@ -250,7 +250,9 @@ fi
#================================================= #=================================================
systemctl reload nginx systemctl reload nginx
systemctl enable "$app"
systemctl start "$app" #=================================================
# App needs time to start # START SERVICE
sleep 10 #=================================================
yunohost service start $app