Files
trove/integration/scripts/files/elements/ubuntu-xenial-redis/install.d/31-fix-init-file
Amrith Kumar 48f4fa52f9 Fix Gate: Force pip2 instead of pip
Something appears to have caused the xenial guests to install all
python libraries into python 3.5 directories and therefore the guest
won't launch. This change forces pip2 and in theory should get around
that.

Moved Redis and PostgreSQL installs after the trove-dep ones.

Change-Id: I3bbe3bafa7ea3e627272103ac16a38f6a32a8a06
Partial-Bug: #1650382
2016-12-16 06:14:10 -05:00

29 lines
582 B
Bash
Executable File

#!/bin/sh
set -e
set -o xtrace
cat > /lib/systemd/system/redis-server.service << '_EOF_'
[Unit]
Description=Advanced key-value store
After=network.target
[Service]
Type=forking
PIDFile=/var/run/redis/redis-server.pid
User=redis
Group=redis
Environment=statedir=/var/run/redis
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p ${statedir}
ExecStartPre=/bin/chown -R redis:redis ${statedir}
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
ExecReload=/bin/kill -USR2 $MAINPID
ExecStop=/usr/bin/redis-cli shutdown
Restart=always
[Install]
WantedBy=multi-user.target
_EOF_