Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # redis-servefile port filename
- # serves a redis dump.rdb file on the specified port
- port=$1
- file=$2
- rundir=`mktemp -d`
- ln -s $file $rundir
- redis-server -<<EOF
- include /etc/redis/redis.conf
- daemonize no
- port $port
- dir $rundir
- EOF
- rm -rf $rundir
Add Comment
Please, Sign In to add comment