diskimage-builder/elements/ironic-agent/install.d/60-ironic-agent-install
Yuriy Zveryanskyy 26e2ec6faa Add install section to Ironic agent systemd service file
"Install" section is necessary for for "systemctl enable" command.

Change-Id: I590ac3a1b58a80e156967dd2787a1ba88e8a6fd5
2014-12-16 18:53:45 +02:00

21 lines
504 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
install-packages python-dev python-pip qemu-utils parted hdparm util-linux genisoimage gcc
pip install -r /tmp/ironic-python-agent/requirements.txt
pip install /tmp/ironic-python-agent
sudo echo $'[Unit]
Description=Ironic Python Agent\n
[Service]
ExecStart=/usr/bin/ironic-python-agent
Restart=always
RestartSec=30s\n
[Install]
WantedBy=multi-user.target\n' > /usr/lib/systemd/system/ironic-python-agent.service
sudo systemctl enable ironic-python-agent.service