1 2 3 4 5 6 7 8 9 10 11 12 13
[Unit] Description=Redis Server After=network.target [Service] Type=simple ExecStart=/usr/bin/redis-server ExecStop=/bin/kill -15 $MAINPID PIDFile=/var/run/redis.pid Restart=always [Install] WantedBy=multi-user.target