1

I have a run sript under ress directory:

#!/bin/sh

exec python gmail_new15.py

And when I try to execute svc I get:

~# svc -du ress/
svc: warning: unable to control ress/: file does not exist

My goal is to control if the python script crashes and restart it.

~# ls ress/
run

~# cat ress/run 
#!/bin/sh

exec python gmail_new15.py
donald
  • 453
  • 2
  • 6
  • 17

1 Answers1

1

Have you started supervise ? The documentation for svc states fairly explicitly that it "controls services monitored by supervise".

And looking at svc.c, that particular error message is raised when it cannot find/open the file supervise/control, wich is automatically created (along with the supervise directory) by supervise if it cannot find it.

See documentation supervise or svscan if you want to start supervise around more than one service.

Kjetil Joergensen
  • 5,994
  • 1
  • 27
  • 20