-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·37 lines (31 loc) · 1.02 KB
/
install.sh
File metadata and controls
executable file
·37 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -e
#
# This script provides a mechanism for easy installation of the
# solidfire-docker-driver, use with curl:
# 'curl -sSl https://raw.githubusercontent.com/solidfire/solidfire-docker-driver/master/install.sh | sudo sh'
BIN_NAME=solidfire-docker-driver
DRIVER_URL="https://github.com/solidfire/solidfire-docker-driver/releases/download/v1.3.2/solidfire-docker-driver"
BIN_DIR="/usr/bin"
do_install() {
mkdir -p /var/lib/solidfire/mount
if [ -f $BIN_DIR/$BIN_NAME ] ; then
rm $BIN_DIR/$BIN_NAME || true
fi
curl -sSL -o $BIN_DIR/$BIN_NAME $DRIVER_URL
chmod +x $BIN_DIR/$BIN_NAME
echo "
[Unit]
Description=\"SolidFire Docker Plugin daemon\"
Before=docker.service
Requires=solidfire-docker-driver.service
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/solidfire-docker-driver daemon start &
[Install]
WantedBy=docker.service" >/etc/systemd/system/solidfire-docker-driver.service
chmod 644 /etc/systemd/system/solidfire-docker-driver.service
systemctl daemon-reload
systemctl enable solidfire-docker-driver
}
do_install