From e61f88c3106c072feb04d0ce73ecb565b8e45fae Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 25 Apr 2013 11:55:06 +0100 Subject: [PATCH] Add systemd support for os-svc-daemon. Change-Id: I04f30db1ff64af383ca605598379e926635cc5e8 --- elements/os-svc-install/bin/os-svc-daemon | 29 ++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/elements/os-svc-install/bin/os-svc-daemon b/elements/os-svc-install/bin/os-svc-daemon index 451c3f141..969b3c670 100755 --- a/elements/os-svc-install/bin/os-svc-daemon +++ b/elements/os-svc-install/bin/os-svc-daemon @@ -23,11 +23,34 @@ exec start-stop-daemon --start -c $user --exec /opt/stack/venvs/$user/bin/$cmd - EOF } +function install_systemd { + local name=$1 + local user=$2 + local cmd=$3 + shift; shift; shift + local args=$* + cat > /etc/systemd/system/$name.service <