Skip to content

Instantly share code, notes, and snippets.

@jdiez17
Last active March 2, 2018 09:53
Show Gist options
  • Save jdiez17/7693424bbdad51a209e88cc8ecd93ff7 to your computer and use it in GitHub Desktop.
Save jdiez17/7693424bbdad51a209e88cc8ecd93ff7 to your computer and use it in GitHub Desktop.
root@project:~# cat /service/hal/run
#!/bin/bash
echo "$(date): waiting for dependency1 to be up"
s6-svwait -u /service/dependency1
echo "$(date): starting hal"
exec 2>&1 /opt/ninox/hal
root@project:~# ps aux | grep s6
root 2684 0.0 0.1 1676 932 pts/2 S+ 12:58 0:00 s6-svscan /service
root 2685 0.0 0.1 1680 980 pts/2 S+ 12:58 0:00 s6-supervise hal
root 2686 0.0 0.1 1680 972 pts/2 S+ 12:58 0:00 s6-supervise dependency1
root 2736 0.0 0.1 1684 916 ? S 12:58 0:00 s6-svwait -u /service/dependency1
root 2737 0.0 0.2 1800 1036 ? S 12:58 0:00 s6-ftrigrd
root 2739 0.0 0.2 1848 1080 pts/4 S+ 12:59 0:00 grep s6
root@project:~# s6-svscanctl -t /service
root@project:~# ps aux | grep s6
root 2736 0.0 0.1 1684 916 ? S 12:58 0:00 s6-svwait -u /service/dependency1
root 2737 0.0 0.2 1800 1048 ? S 12:58 0:00 s6-ftrigrd
root 2747 0.0 0.2 1848 1100 pts/4 S+ 12:59 0:00 grep s6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment