Chris Vogel 1 năm trước cách đây
mục cha
commit
b02d3d4045
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 1 1
      conf/systemd.service
  2. 2 0
      scripts/install

+ 1 - 1
conf/systemd.service

@@ -9,7 +9,7 @@ Group=__APP__
 WorkingDirectory=__INSTALL_DIR__/__APP__
 WorkingDirectory=__INSTALL_DIR__/__APP__
 Environment="UVICORN_PORT=__PORT__"
 Environment="UVICORN_PORT=__PORT__"
 Environment="VENV_DIR=__INSTALL_DIR__/venv/"
 Environment="VENV_DIR=__INSTALL_DIR__/venv/"
-Environment="UVICORN_HOST=__127.0.0.1__"
+Environment="UVICORN_HOST=127.0.0.1"
 ExecStart=__INSTALL_DIR__/venv/bin/uvicorn --reload flohmarkt:app
 ExecStart=__INSTALL_DIR__/venv/bin/uvicorn --reload flohmarkt:app
 StandardOutput=append:/var/log/__APP__/__APP__.log
 StandardOutput=append:/var/log/__APP__/__APP__.log
 StandardError=inherit
 StandardError=inherit

+ 2 - 0
scripts/install

@@ -98,6 +98,8 @@ ynh_add_systemd_config
 # integrate into yunohost
 # integrate into yunohost
 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
 yunohost service add $app --description="A self-hosted, single-user, ActivityPub powered microblog." --log="/var/log/$app/$app.log"
 yunohost service add $app --description="A self-hosted, single-user, ActivityPub powered microblog." --log="/var/log/$app/$app.log"
+# start service
+ynh_systemd_action --service_name=$app --action="start"
 
 
 # SETUP FAIL2BAN
 # SETUP FAIL2BAN
 # no need for couchdb, because it will not listen externally
 # no need for couchdb, because it will not listen externally