[Unit]
Description=Redis Server
Documentation=man:redis(8)
Documentation=https://redis.io/docs/
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
User=redis{{port}}
Group=redis
ExecStart={{basedir}}/bin/redis-server /etc/redis-{{port}}.conf
ExecStop={{basedir}}/bin/redis-cli -p {{port}} shutdown
PIDFile=/database/redis/{{port}}/redis.pid
LimitNOFILE = 102400
Environment=REDIS_PARENT_PID=1
Restart=on-failure
RestartPreventExitStatus=1
PrivateTmp=false
#AmbientCapabilities=CAP_SYS_NICE

# -- ~ _ ~    ~ _ ~     ~ _ ~ -- 
# base on redis-7.0.11
# generated by https://www.sqlpy.com at {{now}}
# wechat: jianglegege
# email: 1721900707@qq.com
# -- ~ _ ~ --