[Lunar-commits] <moonbase> systemd: Make unit dir variable.
Auke Kok
sofar at foo-projects.org
Sun Jan 22 22:57:09 CET 2012
commit 79b6a7793259c2b7c23762d6cf7bdc7fbc9892bb
Author: Auke Kok <sofar at foo-projects.org>
Date: Sun Jan 22 22:57:09 2012 +0100
systemd: Make unit dir variable.
---
zbeta/systemd/plugin.d/systemd.plugin | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/zbeta/systemd/plugin.d/systemd.plugin b/zbeta/systemd/plugin.d/systemd.plugin
index 4b37402..c30c794 100644
--- a/zbeta/systemd/plugin.d/systemd.plugin
+++ b/zbeta/systemd/plugin.d/systemd.plugin
@@ -47,9 +47,11 @@ plugin_systemd_configure()
plugin_systemd_post_build()
{
- local SERVICES SERVICE
+ local SERVICES SERVICE SYSTEMDUNITDIR
debug_msg "plugin_systemd_post_build ($@)"
+ local SYSTEMDUNITDIR=$(pkg-config systemd --variable=systemdsystemunitdir)
+
if [ -d $SCRIPT_DIRECTORY/systemd.d ]; then
invoke_installwatch
verbose_msg "handling systemd.d services" | tee -a $C_LOG
@@ -57,7 +59,7 @@ plugin_systemd_post_build()
SERVICES=$(ls -1)
for SERVICE in $SERVICES; do
- /usr/bin/install -g 0 -o 0 -m 0644 $SERVICE /lib/systemd/system/$SERVICE
+ /usr/bin/install -g 0 -o 0 -m 0644 $SERVICE $SYSTEMDUNITDIR/$SERVICE
done
cd $SCRIPT_DIRECTORY
devoke_installwatch
More information about the Lunar-commits
mailing list