# copy this file into /etc/systemd/system # mkdir traffic_router_async in /var/log # then, start the service using command below # $ systemctl start traffic_router_async # to stop use it as # $ systemctl stop traffic_router_async [Unit] Description=Traffic Router Async is an alternative to server like Apache Web Server ConditionPathExists=/home/mohan/projects/traffic_router_async After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 User=mohan WorkingDirectory=/home/mohan/projects/traffic_router_async ExecStart=/home/mohan/projects/traffic_router_async/traffic_router_async # make sure log directory exists and owned by syslog PermissionsStartOnly=true ExecStartPre=/bin/mkdir -p /var/log/traffic_router_async ExecStartPre=/bin/chown syslog:adm /var/log/traffic_router_async ExecStartPre=/bin/chmod 755 /var/log/traffic_router_async StandardOutput=syslog StandardError=syslog SyslogIdentifier=traffic_router_async [Install] WantedBy=multi-user.target