Jelajahi Sumber

:hammer: add lily startup scripts

Jeremy Zheng 2 tahun lalu
induk
melakukan
a660ff9589

+ 1 - 1
deploy/roles/mint-v2/templates/v2/lily/services/server.service.j2

@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 Type=simple
-ExecStart={{ app_deploy_root }}/agile/rpc/lily/run.sh server config.toml
+ExecStart=/bin/bash lily.sh -d -c config.toml --server
 WorkingDirectory={{ app_deploy_root }}/agile/rpc/lily
 User=www-data
 Group=www-data

+ 1 - 1
deploy/roles/mint-v2/templates/v2/lily/services/worker.service.j2

@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 Type=simple
-ExecStart={{ app_deploy_root }}/agile/rpc/lily/run.sh worker config.toml
+ExecStart=/bin/bash lily.sh -d -c config.toml --worker
 WorkingDirectory={{ app_deploy_root }}/agile/rpc/lily
 User=www-data
 Group=www-data

+ 2 - 0
rpc/lily/.gitignore

@@ -1,2 +1,4 @@
 __pycache__/
 /tmp/
+/config.toml
+/python/

+ 5 - 0
rpc/lily/lily.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+source $PWD/python/bin/activate
+
+python lily $*