I installed runit-2.1.2
on my ubuntu box,
And, I Created very simple streaming
service as below,
mkdir -p /etc/sv/streaming/
echo 'echo "streaming" >> /var/log/streaming.log' > /etc/sv/streaming/run
Then,
created symlink to /etc/service/streaming
,
ln -s /etc/sv/streaming /etc/service/streaming
As, I can see below, symlink is created,
root@moby:/# ll /etc/service/streaming
lrwxrwxrwx 1 root root 17 Dec 2 00:27 /etc/service/streaming -> /etc/sv/streaming/
Waited 5 secs, nothing happens.
I also tried manually as below,
root@moby:/# sv status /etc/service/streaming
warning: /etc/service/streaming: unable to open supervise/ok: file does not exist
I'm using ubuntu 16.04
root@moby:/# cat /etc/*release | grep RELEASE
DISTRIB_RELEASE=16.04
I feel like runit
is not running at all.
root@moby:/# ps -ef | grep runsvdir
root 1976 7 0 00:58 ? 00:00:00 grep --color=auto runsvdir
I don't know the script to start runit either,
root@moby:/# service runit start
runit: unrecognized service
or
root@moby:/# service sv status
sv: unrecognized service
Can runit
users help me know what's going on here?
I solved this problem by adding the following files, inspired by the configuration for a previously running
runit
server on Ubuntu 16.04 LTS:vagrant@vagrant:/usr/bin$ ls -l runsvdir-start* -rwxr-xr-x 1 root root 544 Aug 19 05:04 runsvdir-start
contents:
and
vagrant@vagrant:/usr/bin$ ls -l /lib/systemd/system/runit.service -rw-r--r-- 1 root root 143 Aug 19 05:07 /lib/systemd/system/runit.service
You may want to confirm paths with
which runsvdir
and this after anapt-get install runit
.I have had the same issue on ubuntu 18.04. I was getting the following error while executing "sv status dir_name"
The runsvdir is also not showing up in "grep" output. I have solved the issue by installing runit-systemd package. Please use the following command to install in ubuntu and debian systems
I have found this solution from another askubuntu question
I hope this helps