Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Vidal
66
Commits
f9beadde
Commit
f9beadde
authored
6 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
update 66-scandir documentation
parent
13c009e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/66-scandir.html
+93
-86
93 additions, 86 deletions
doc/66-scandir.html
with
93 additions
and
86 deletions
doc/66-scandir.html
+
93
−
86
View file @
f9beadde
...
...
@@ -24,7 +24,7 @@ to be either the root or a branch of a <em>supervision tree</em>.
<h2>
Interface
</h2>
<pre>
66-scandir [ -h help ] [ -v
<em>
verbosity
</em>
] [ -b boot ] [ -l
<em>
live
</em>
] [ -t
<em>
rescan
</em>
]
[ -
f
<em>
finish command
</em>
] [ -e
<em>
environment
</em>
] [ -c create ] [ -r remove ] [ -u up ] [ -
d
<em>
signal
</em>
] owner
66-scandir [ -h help ] [ -v
<em>
verbosity
</em>
] [ -b boot ] [ -l
<em>
live
</em>
] [ -t
<em>
rescan
</em>
] [ -
2
<em>
stage2.tini
</em>
] [ -3
<em>
stage3
</em>
] [ -e
<em>
environment
</em>
] [ -c create ] [ -r remove ] [ -u up ] [ -
s
<em>
signal
</em>
] owner
</pre>
<p>
66-scandir will handle or create the scandir at
<em>
live
</em>
for a specific
...
...
@@ -37,13 +37,17 @@ permissions to create the necessary directories at <em>live</em>. If the
<ul>
<li>
<tt>
-h
</tt>
: print the help.
</li>
<li>
<tt>
-v
<em>
verbosity
</em></tt>
: increase/decrease verbosity level.
0 or 1: print only error messages. 2: print warning message. Over 3: debugging mode.
</li>
<li>
<tt>
-b
</tt>
: create specific files for boot. Only root
user can use this option - see below.
</li>
<li>
<tt>
-l
<em>
live
</em></tt>
: create the scandir at
<em>
live
</em>
.Default is
<tt>
/run/66
</tt>
. The default can be changed at compile-time by
giving the
<tt>
--livedir=
<em>
live
</em></tt>
option to
<tt>
./configure
</tt>
.
</li>
<li>
<tt>
-t
<em>
rescan
</em></tt>
: perform a scan every
<em>
rescan
</em>
milliseconds. If
<em>
rescan
</em>
is 0 (the default), automatic scans are never performed after
the first one and s6-svscan will only detect new services when told to
...
...
@@ -51,20 +55,33 @@ permissions to create the necessary directories at <em>live</em>. If the
<a
href=
"https://skarnet.org/software/s6/s6-svscanctl.html"
>
66-svscanctl -a
</a>
command.
It is
<em>
strongly
</em>
discouraged to set
<em>
rescan
</em>
to a positive value under 500.
</li>
<li>
<tt>
-f
<em>
finish command
</em></tt>
: set the command to
<li>
<tt>
-2
<em>
stage2.tini
</em></tt>
: set the command to
execute with configurable handlers when the scandir receive a signal.
An absolute path is expected. This options is mandatory if the
<em>
-b
</em>
has been given. If it's not specified /etc/66/stage2.tini scripts is
took by default. Without the
<em>
-b
</em>
options, this options have
no effects - see below.
</li>
<li>
<tt>
-3
<em>
stage3
</em></tt>
: set the command script to
execute when the scandir is asked to be shutted down. An absolute path is expected.
This options is mandatory if the
<em>
-b
</em>
has been given. On other
case this options have no effects - see below.
This options is mandatory if the
<em>
-b
</em>
has been given. If it's not specified
/etc/66/stage3 scripts is took by default. Without the
<em>
-b
</em>
options, this
options have no effects - see below.
</li>
<li>
<tt>
-e
<em>
environment
</em></tt>
: adjust the environment variable of the scandir with
variables find on the
<em>
environment
</em>
directory. It reads every files
in
<em>
environment
</em>
directory that does not begin with a dot and does
not contain the '=' character. An absolute path is expected.
</li>
<li>
<tt>
-c
</tt>
: create the neccessary directories at
<em>
live
</em>
.
This option is expected to be done before trying to run the scandir by the options
<em>
-u
</em>
.
</li>
<li>
<tt>
-r
</tt>
: remove the scandir directory at
<em>
live
</em>
.
The scandir must be stopped previously with the options
<em>
-d
</em>
.
</li>
<li>
<tt>
-u
</tt>
: start the scandir directory at
<em>
live
</em>
.
</li>
<li>
<tt>
-d
<em>
signal
</em></tt>
: send a
<em>
signal
</em>
to the scandir directory.
<li>
<tt>
-s
<em>
signal
</em></tt>
: send a
<em>
signal
</em>
to the scandir directory.
The signal can be any valid
<a
href=
"https://skarnet.org/software/s6/s6-svscanctl.html"
>
s6-svscanctl
</a>
command more some convenient sentence - see below.
</li>
</ul>
...
...
@@ -82,11 +99,11 @@ Also some convenient sentence was added to avoid to remember basic and usefull s
of command like :
<ul>
<li><tt>
reload
</tt>
: this will send an
<em>
-an
</em>
command
</li>
<li><tt>
interrupt
</tt>
: this will send an
<em>
-
rt
</em>
command
</li>
<li><tt>
interrupt
</tt>
: this will send an
<em>
-
i
</em>
command
</li>
<li><tt>
quit
</tt>
: this will send an
<em>
-q
</em>
command
</li>
<li><tt>
halt
</tt>
: this will send an
<em>
-
st
</em>
command
</li>
<li><tt>
reboot
</tt>
: this will send an
<em>
-
i
</em>
command
</li>
<li><tt>
poweroff
</tt>
: this will send an
<em>
-
pt
</em>
command
</li>
<li><tt>
halt
</tt>
: this will send an
<em>
-
0
</em>
command
</li>
<li><tt>
reboot
</tt>
: this will send an
<em>
-
6
</em>
command
</li>
<li><tt>
poweroff
</tt>
: this will send an
<em>
-
7
</em>
command
</li>
</ul></p>
<h3>
Signal usage examples
</h3>
...
...
@@ -136,110 +153,100 @@ but are usefull to control the e.g shutdown process. The <em>66-scandir</em>
program will care of it and create those files at
<tt>
/run/66/scandir/0/.s6-svscan
</tt>
directory. Depending if the
<tt>
-b
</tt>
options is passed or not to the command line,
the files will change.
</p>
<p>
The path of the scandir in those files is automatically define in
conjonction with the
<tt>
-l
<em>
live
</em></tt>
options.
</p>
<h5>
crash file
</h5>
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
redirfd -r 0 /dev/console
redirfd -w 1 /dev/console
fdmove -c 2 1
s6-echo -- "scandir /run/66/scandir/0 crashed...
s6-echo -- "scandir /run/66/scandir/0 crashed ... "
/bin/sh -i
</pre>
<p>
without the
<tt>
-b
</tt>
option
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
foreground { 66-all -v3 -l /run/66/ down }
s6-echo -- "scandir /run/66/scandir/0 crashed..."
</pre>
<h5>
finish file
</h5>
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -S0
fdmove -c 2 1
s6-envdir .env
cd /
redirfd -w 2 /dev/console
fdmove -c 1 2
foreground { s6-svc -X -- /run/66/scandir/0/scandir-log }
unexport ?
wait r -- { }
/etc/66/stage3 $@
</pre>
<p>
The last command (in our example
<tt>
/etc/66/stage3 @
</tt>
) is set
by the
<tt>
-f
<em>
finish command
</em></tt>
options given
on the command line. If your e.g
<tt>
finish command
</tt>
is
<em>
/usr/bin/true
</em>
<pre>
#!/usr/bin/execlineb -S0
/etc/66/stage3 $@
</pre>
<p>
The last command is set by the
<tt>
-3
<em>
stage3
</em></tt>
options given
on the command line. If your e.g
<tt>
stage3
</tt>
argument is
<em>
/usr/bin/true
</em>
your
<em>
finish
</em>
file will be:
<pre>
#!/usr/local/bin/execlineb -S0
fdmove -c 2 1
s6-envdir .env
cd /
redirfd -w 2 /dev/console
fdmove -c 1 2
foreground { s6-svc -X -- /run/66/scandir/0/scandir-log }
unexport ?
wait r -- { }
/usr/bin/true
</pre></p>
/usr/bin/true
</pre></p>
<p>
without the
<tt>
-b
</tt>
option
</p>
<pre>
#!/usr/local/bin/execlineb -S0
fdmove -c 2 1
s6-envdir .env
s6-echo -- "scandir /run/66/scandir/0 shutted down..."
</pre>
<pre>
#!/usr/bin/execlineb -S0
s6-echo -- "scandir /run/66/scandir/1000 shutted down..."
</pre>
<h5>
SIGHUP file
</h5>
<p>
With
or without
the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/
local/
bin/execlineb -P
f
dmove -c 2 1
s6-
envdir .env
foreground { 66-dbctl -v3 -l /run/66/ -d Master }
s6-svscanctl -h .
</p
re
>
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
f
oreground { /etc/66/stage2.tini }
s6-
svscanctl -h -- /run/66/scandir/0
</pre>
<p>
The command executed before sending a signal to the scandir is set
by the
<tt>
-2
<em>
stage2.tini
</em></tt>
options given
on the command line.
</p>
<h5>
SIGINT file
</h5>
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -6 .
s6-svscanctl -h -- /run/66/scandir/0
</pre>
<h5>
SIGINT file
</h5>
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { /etc/66/stage2.tini }
s6-svscanctl -6 -- /run/66/scandir/0
</pre>
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -6 -- /run/66/scandir/0
</pre>
<h5>
SIGQUIT file
</h5>
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { /etc/66/stage2.tini }
s6-svscanctl -q -- /run/66/scandir/0
</pre>
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -7 .
</pre>
s6-svscanctl -q -- /run/66/scandir/0
</pre>
<h5>
SIGTERM file
</h5>
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { /etc/66/stage2.tini }
s6-svscanctl -t -- /run/66/scandir/0
</pre>
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -t .
</pre>
s6-svscanctl -t -- /run/66/scandir/0
</pre>
<h5>
SIGUSR1 file
</h5>
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
s6-svscanctl -an .
</pre>
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { /etc/66/stage2.tini }
s6-svscanctl -7 -- /run/66/scandir/0
</pre>
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -7 -- /run/66/scandir/0
</pre>
<h5>
SIGUSR2 file
</h5>
<p>
With or without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir .env
<p>
With the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { /etc/66/stage2.tini }
s6-svscanctl -O -- /run/66/scandir/0
</pre>
<p>
Without the
<tt>
-b
</tt>
options the file will be:
</p>
<pre>
#!/usr/bin/execlineb -P
foreground { 66-all -v3 -l /run/66/ down }
s6-svscanctl -0 .
</pre>
s6-svscanctl -O -- /run/66/scandir/0
</pre>
<h2>
Environment configuration
</h2>
...
...
@@ -273,7 +280,7 @@ example: </p>
<p>
The root
<tt>
live
</tt>
(a.k.a
<tt>
/run/66
</tt>
) directory will be not
removed because an another user can still use it. In fact the
<em>
66-scandir
</em>
will only remove the componment of the corresponding uid of the
<tt>
owner
</tt>
.
</p>
<p>
A
n
running scandir can not be removed. You must stop the scandir
before
to
<p>
A running scandir can not be removed. You must stop
first
the scandir to
be able to remove it.
</p>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment