I have added a service unit in Ubuntu 16.04:
[Unit]
Description=seaweedfs
After=network.target
[Service]
User=root
ExecStart=/root/work/bin/weed -v=0 volume -mserver=18.21.1.150:9333 -ip=8.9.4.9 -dir=/storage -max=2270 -images.fix.orientation=false -pulseSeconds=1
Everything is working fine. But I want to know if the process has been started or not. Or if it stopped, then I want to see some output as it has been stopped.
Right now am doing service seaweedfs start
. It starts but doesn't show any message. I want to add some useful messages to it on start or stop.
Will be thankful for any help :)
systemctl start seaweedfs
? – muru Nov 04 '16 at 06:19systemd
will swallow any and all output from starting a unit and send it to the logs. You will probably have to write a wrapper aroundservice
(or callservice seaweedfs status
immediately after). – muru Nov 04 '16 at 06:25ExecStartPost
andExecStopPost
options, but as I said, the output will go to the logs. – muru Nov 04 '16 at 06:32start on filesystem or runlevel [2345] stop on runlevel [!2345] limit nofile 1000000 1000000
– Junaid Farooq Nov 04 '16 at 06:34