# 本文件一般放置在/etc/systemd/system目录下
# 可由linxu中systemctl工具（命令）进行管理，常用命令：   
# systemctl status wtoaamapi.service
# systemctl start wtoaamapi.service
# systemctl restart wtoaamapi.service
# systemctl stop wtoaamapi.service
# systemctl enable wtoaamapi.service  
# systemctl disenable wtoaamapi.service  
[Unit]
Description=Daemon Of Django

[Service]
WorkingDirectory=/data/souce_code/produce/JointDebug/WTOAAM/wtoaamapi
# 命令必须为绝对路径           
# ExecStart=/usr/local/python3/bin/gunicorn --workers 3 --bind unix:/data/souce_code/produce/JointDebug/WTOAAM/wtoaamapi.sock wtoaamapi.wsgi:application # 本命令方式无法指定ip和端口,即无法访问服务
ExecStart=/usr/local/python3/bin/gunicorn --workers 3 --bind 127.0.0.1:8000 wtoaamapi.wsgi:application # 本命令方式无法按预想的目录结构运行程序，须移动appConfig.json文件至wtoaamapi项目根目录的conf文件夹下
# WorkingDirectory=/data/souce_code/produce/JointDebug/WTOAAM
# ExecStart=/usr/bin/python wtoaamapi/manage.py runserver 0.0.0.0:8000
ExecStop=/bin/kill -s TERM $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always

[Install]
Alias=wtoaamapi.service
WantedBy=wtoaamapi.service
