Add systemd support to manila-ssh
Because we're using ubuntu-minimal there is no cloud init support and we have manila-ssh as a substitute. Manila-ssh was only designed to work with upstart. This patch adds systemd support. Change-Id: Id43dc8effb846dcaf68b50eace68df8a076899a1
This commit is contained in:
parent
56c5f46a4d
commit
ffabcc1a59
@ -13,6 +13,9 @@ install -D -g root -o root -m 0755 ${SCRIPTDIR}/fetch-public-ssh-keys.sh /usr/lo
|
|||||||
DIB_INIT_SYSTEM=$(dib-init-system)
|
DIB_INIT_SYSTEM=$(dib-init-system)
|
||||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/fetch-public-ssh-keys.conf /etc/init/fetch-public-ssh-keys.conf
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/fetch-public-ssh-keys.conf /etc/init/fetch-public-ssh-keys.conf
|
||||||
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ] ; then
|
||||||
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/fetch-public-ssh-keys.service /etc/systemd/system
|
||||||
|
systemctl enable fetch-public-ssh-keys
|
||||||
else
|
else
|
||||||
echo "Not supported"
|
echo "Not supported"
|
||||||
fi
|
fi
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Fetch Public Keys
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/local/sbin/fetch-public-ssh-keys.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user