I am following http://masnun.rocks/2016/11/02/deploying-django-channels-using-daphne this tutorial to deploy Django channel on Nginx.In this tutorial, they used upstart script to run daphne serve.I need to convert upstart script to systemd because i am working on ubuntu 16.04.
Below is upstart script
start on runlevel [2345]
stop on runlevel [016]
respawn
script
cd /home/ubuntu/Project/projectname
export DJANGO_SETTINGS_MODULE="projectname.settings"
exec daphne -b 0.0.0.0 -p 8001 projectname.asgi:channel_layer
end script
Below is systemd script which i converted
[Unit]
Description=daphne server script
[Service]
Environment=DJANGO_SETTINGS_MODULE="projectname.settings"
WorkingDirectory=/home/ubuntu/Project/projectname
ExecStart=daphne -b 0.0.0.0 -p 8001 projectname.asgi:channel_layer
Restart=always
[Install]
WantedBy=multi-user.target
When i run systemd service status it gave me below error
Failed to get properties: No such interface ''