#!/bin/bash

sudo supervisorctl stop hs
sudo rm /dev/shm/*
cd /home/heco/HECO/HECOService
export LD_LIBRARY_PATH=/home/heco/HECO/HECOService:$LD_LIBRARY_PATH
./HECOService





# /usr/bin/supervisorctl stop hs
# /usr/bin/supervisorctl stop hs

#sudo supervisorctl reread
#sudo supervisorctl update
# sudo systemctl daemon-reload

# 版本切换设置
# /etc/systemd/system/ecap.service
# sudo systemctl daemon-reload
# sudo systemctl start ecap
# systemctl status ecap
# sudo systemctl enable ecap
# systemctl is-enabled ecap
# 停止
#sudo systemctl stop ecap
# 重启
#sudo systemctl restart ecap
# 重新加载（程序不重启）
#sudo systemctl reload ecap   # 前提是程序支持 SIGHUP
# 查看日志
#journalctl -u ecap
#journalctl -u ecap -f
# echo 'ECAP_DIR=/home/heco/ys_ecap_server/v1.0.2' | sudo tee -a /etc/ecap/env


# ln -sf /home/heco/ys_ecap_server/v1.0.2/ecap_server /home/heco/ys_ecap_server



#  ps -ef | grep start_22.sh



# pstree -sp $(pgrep -o HECOService)

# # pstree -sp 712


#    systemd(1)───sshd(655)───sshd(1788)───sshd(1876)───bash(1898)───bash(18630)───HECOService(18641)─┬─{HECOService}(18642)
#                                                                                                     ├─{HECOService}(18660)
#                                                                                                     ├─{HECOService}(18661)
#                                                                                                     └─{HECOService}(18662)



#     systemd(1)───sshd(655)───sshd(1788)───sshd(1876)───bash(1898)───HECOService(20409)─┬─curl(20451)
#                                                                                        ├─{HECOService}(20425)
#                                                                                        ├─{HECOService}(20448)
#                                                                                        ├─{HECOService}(20449)
#                                                                                        └─{HECOService}(20450)



#      systemd(1)───HECOService(41201)─┬─{HECOService}(41218)
#                                      ├─{HECOService}(41242)
#                                      ├─{HECOService}(41243)
#                                      └─{HECOService}(41244)
