Replace numbered build scripts with updated ones

This commit is contained in:
2014-12-26 15:04:41 +01:00
parent 86776154c8
commit 4c35d6757c
21 changed files with 34 additions and 29 deletions

24
build/scripts/redis.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
source /build/config
set -x
## Redis
$minimal_apt_get_install redis-server
export REDIS_CONFIG=/etc/redis/redis.conf
export REDIS_LOG=/host/var/log/redis/redis.log
export REDIS_DATA=/host/var/lib/redis
sed -i "s,^\(daemonize\s*\).*$,\1no," $REDIS_CONFIG
sed -i "s,^\(logfile\s*\).*$,\1$REDIS_LOG," $REDIS_CONFIG
sed -i "s,^\(dir\s*\).*$,\1$REDIS_DATA," $REDIS_CONFIG
## Runit script
mkdir /etc/service/redis
mv /build/runit/redis /etc/service/redis/run
## Environment variables
echo -n $REDIS_CONFIG > /etc/container_environment/REDIS_CONFIG
echo -n $REDIS_LOG > /etc/container_environment/REDIS_LOG
echo -n $REDIS_DATA > /etc/container_environment/REDIS_DATA