<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Thank you for the suggestions.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">But with this suggestion I need to run as user something like that.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">In normal init.d systems, we have environment variables like PATH & LD_LIBRARY_PATH. <br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">No matter where I place my new executable or library, adding that path into these environment variables is enough to execute or link the library.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Probably this kind of facility is not available in Systemd init systems.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Regards,</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Raghavendra H R</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br><font style="font-family:times new roman,serif" size="2"></font></div></div></div></div><div class="gmail_quote">On Thu, Sep 22, 2016 at 12:34 AM, Kai Krakow <span dir="ltr"><<a href="mailto:hurikhan77@gmail.com" target="_blank">hurikhan77@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Wed, 21 Sep 2016 16:56:52 +0530<br>
schrieb "Raghavendra. H. R" <<a href="mailto:raghuhr84@gmail.com">raghuhr84@gmail.com</a>>:<br>
<span class=""><br>
> Hi,<br>
><br>
> I'm newbie with systemd boot system and I need help in resolving one<br>
> issue.<br>
><br>
> I would like to create a service under a customized path Eg:/mnt and<br>
> systemd should be able to pick my unit file from this.<br>
><br>
</span>> I tried by setting *Environment=SYSTEMD_UNIT_<wbr>PATH=/mnt *from the<br>
> console but it didnt help and found the error *"Failed to start<br>
<span class="">> startup.service: Unit startup.service failed to load: No such file or<br>
</span>> directory."*<br>
<span class="">><br>
><br>
> Is it possible to achieve this ?<br>
<br>
</span>Not sure if this helps you, i.e. is appropriate for your use-case...<br>
<br>
But if the directory happens to be a home directory and the services<br>
are designed to be run as user, you could make the service files go<br>
into $HOME/.config/systemd/user/ (or symlink this to your mountpoint)<br>
and enable linger on the user (loginctl enable-linger $USER).<br>
<br>
You can then manage these units as the user through "system --user<br>
{start,stop,enable,...}" (only with real login sessions, not through<br>
sudo -iu $USER, but ssh would work).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards,<br>
Kai<br>
<br>
Replies to list-only preferred.<br>
<br>
______________________________<wbr>_________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/systemd-devel</a><br>
</font></span></blockquote></div><br></div></div>