I have Jekyll installed into my CentOS 7 VPS. I want to run it as systemd service. So I have created a file called jekyll.service inside /etc/systemd/system/ folder with following content:
[Service]
User=arup
Type=simple
WorkingDirectory=/home/arup/blog/
ExecStart=/usr/local/rvm/gems/ruby-2.6.3/bin/jekyll serve --watch --source "/home/arup/blog/"
ExecStop=/usr/bin/pkill -f jekyll
Restart=always
TimeoutStartSec=60
RestartSec=60
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=jekyll
[Install]
WantedBy=multi-user.target network-online.target
When I give following command:
systemctl start jekyll
It’s working with no error. But following Error arrives with systemctl status command:
```
* jekyll.service
Loaded: loaded (/etc/systemd/system/jekyll.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2019-08-11 15:07:47 UTC; 49s ago
Process: 2460 ExecStop=/usr/bin/pkill -f jekyll (code=exited, status=1/FAILURE)
Process: 2459 ExecStart=/usr/local/rvm/gems/ruby-2.6.3/bin/jekyll serve --watch --source /home/arup/dbyll/ (code=exited, status=127)
Main PID: 2459 (code=exited, status=127)
Aug 11 15:07:47 iamarup systemd[1]: Unit jekyll.service entered failed state.
Aug 11 15:07:47 iamarup systemd[1]: jekyll.service failed.
What’s wrong here? Can anybody pls help?
Thanks.