systemd rejecting with 'more than one ExecStart= setting'
25
votes
3
answers
46474
views
I'm trying to write a systemd service file for redis.
Here's my file:
[Unit]
PartOf=smp-data-services.target
Description=Redis persistent key-value database
After=network.target
[Service]
ExecStart=/opt/eg/share/redis/bin/redis-server
ExecStop=/opt/eg/share/redis/bin/redis-cli
Restart=on-failure
User=eg
Group=eg
[Install]
WantedBy=multi-user.target
No matter what I do, I keep getting:
# systemctl daemon-reload
systemd: redis.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
I can start redis on the command line with no issue like this:
/opt/eg/share/redis/bin/redis-server
I've read that redis' daemonized forking process is non-standard, and I should avoid Type=forking or oneshot.
Asked by rajat banerjee
(401 rep)
Dec 7, 2017, 02:18 AM
Last activity: Apr 13, 2022, 06:14 AM
Last activity: Apr 13, 2022, 06:14 AM