<div dir="ltr"><div>Hi,<br><br>I've followed this example with success: <a href="http://superuser.com/a/393429/77086">http://superuser.com/a/393429/77086</a><br><br>However, I am trying to do one more variable substitution by altering the path to the executable used by ExecStart:<br>

<br># cat /usr/lib/systemd/system/uwsgi@.service<br>[Unit]<br>Description=uWSGI service for %i<br>After=syslog.target<br><br>[Service]<br>ExecStart=/srv/.virtualenvs/%i/bin/uwsgi --ini /etc/uwsgi/%i.ini<br>ExecReload=/bin/kill -HUP $MAINPID<br>

KillSignal=SIGINT<br>Restart=always<br>Type=simple<br><br>[Install]<br>WantedBy=multi-user.target<br></div><div><br># systemctl status uwsgi@myproject<br>uwsgi@myproject.service - uWSGI service for myproject<br>      Loaded: loaded (/usr/lib/systemd/system/uwsgi@.service; enabled)<br>

      Active: failed (Result: start-limit) since Thu, 2013-01-03 14:01:31 CST; 4s ago<br>     Process: 23921 ExecStart=/srv/.virtualenvs/%i/bin/uwsgi --ini /etc/uwsgi/%i.ini (code=exited, status=203/EXEC)<br>      CGroup: name=systemd:/system/uwsgi@.service/myproject<br>

<br>systemd[1]: Started uWSGI service for myproject.<br>systemd[1]: uwsgi@myproject.service: main process exited, code=exited, status=203/EXEC<br>systemd[1]: Unit uwsgi@myproject.service entered failed state<br>systemd[1]: Stopping uWSGI service for myproject...<br>

systemd[1]: Starting uWSGI service for myproject...<br>systemd[1]: Failed to start uWSGI service for myproject.<br>systemd[1]: Unit uwsgi@myproject.service entered failed state<br><br># cat /etc/issue <br>Arch Linux \r (\l)<br>

<br># uname -a<br>Linux noufos 3.6.10-1-ARCH #1 SMP PREEMPT Tue Dec 11 09:40:17 CET 2012 x86_64 GNU/Linux<br><br># systemctl --version<br>systemd 196<br>arch<br>+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ<br>

<br>Everything in this script works except the first %i variable
 on the ExecStart line because I can get the service to start correctly simply by hardcoding the path to the uwsgi executable:<br><br>     ExecStart=/srv/.virtualenvs/myproject/bin/uwsgi --ini /etc/uwsgi/%i.ini<br><br>So I am wondering if this is a bug or intentional behavior. Alternative suggestions to using the template appreciated.<br>

<br></div><div>Thanks,<br>Tom<br></div></div>