Re: [systemd-devel] Is it possible to load unit files from paths other than default paths ?
Am Wed, 21 Sep 2016 16:56:52 +0530 schrieb "Raghavendra. H. R" : > Hi, > > I'm newbie with systemd boot system and I need help in resolving one > issue. > > I would like to create a service under a customized path Eg:/mnt and > systemd should be able to pick my unit file from this. > > I tried by setting *Environment=SYSTEMD_UNIT_PATH=/mnt *from the > console but it didnt help and found the error *"Failed to start > startup.service: Unit startup.service failed to load: No such file or > directory."* > > > Is it possible to achieve this ? Not sure if this helps you, i.e. is appropriate for your use-case... But if the directory happens to be a home directory and the services are designed to be run as user, you could make the service files go into $HOME/.config/systemd/user/ (or symlink this to your mountpoint) and enable linger on the user (loginctl enable-linger $USER). You can then manage these units as the user through "system --user {start,stop,enable,...}" (only with real login sessions, not through sudo -iu $USER, but ssh would work). -- Regards, Kai Replies to list-only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is it possible to load unit files from paths other than default paths ?
21.09.2016 14:26, Raghavendra. H. R пишет: > Hi, > > I'm newbie with systemd boot system and I need help in resolving one issue. > > I would like to create a service under a customized path Eg:/mnt and > systemd should be able to pick my unit file from this. > > I tried by setting *Environment=SYSTEMD_UNIT_PATH=/mnt *from the > console This should be set in environment of srarted systemd, which in case of systemwide init effectively means either you need to use some wrapper to set it and exec systemd or hack initrd. Also SYSTEMD_UNIT_PATH does not really play nicely with priorities of unit locations (run-time vs. sysadmin vs. shipped). May be it is simpler to install generator that copies your unit definition in standard location. This guarantees it is available before systemd starts. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Is it possible to load unit files from paths other than default paths ?
Hi, I'm newbie with systemd boot system and I need help in resolving one issue. I would like to create a service under a customized path Eg:/mnt and systemd should be able to pick my unit file from this. I tried by setting *Environment=SYSTEMD_UNIT_PATH=/mnt *from the console but it didnt help and found the error *"Failed to start startup.service: Unit startup.service failed to load: No such file or directory."* Is it possible to achieve this ? -- Regards, Raghavendra. H. R (Raghu) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel