runtime/scripts/enable_redis.sh

22 lines
447 B
Bash
Raw Permalink Normal View History

2020-02-02 21:06:11 +00:00
#!/bin/sh
mkdir -p /srv/var/redis
mkdir -p /srv/run
2023-10-26 22:54:55 +00:00
cp /opt/examples/redis/redis.conf /srv/conf/
2020-02-02 21:06:11 +00:00
cat << EOF > /srv/conf/supervisor.d/redis.conf
[program:redis]
command=redis-server /srv/conf/redis.conf
autostart=true
autorestart=true
stdout_logfile=/srv/log/redis.log
stdout_logfile_maxbytes=2MB
stdout_logfile_backups=5
stdout_capture_maxbytes=2MB
stdout_events_enabled=false
redirect_stderr=true
EOF
supervisorctl reread
supervisorctl update