diff --git a/doc/configure.md b/doc/configure.md index 0b066f26df64a123a1c05b97926c4a42e42bdfbc..f9e25ae3dad6be34348f3fb2a05dce6c4dfe40f6 100644 --- a/doc/configure.md +++ b/doc/configure.md @@ -46,36 +46,43 @@ The edition of the [configuration](service-configuration-file.html) file is the ## Usage examples Lists the defined environment variable of the service `foo` + ``` 66 configure -L foo ``` Change the value of the `CMD_ARGS` variable for the service `nginx` + ``` 66 configure -r CMD_ARGS='-c /etc/nginx/nginx.conf -g "daemon off;"' nginx ``` Import the configuration file from the 0.1.6 version to th e0.1.7 version of the service `foo` + ``` 66 configure -i 0.1.6,0.1.7 foo ``` Get the list of version available for the service `foo` + ``` 66 configure -V foo ``` Edit the configuration file of the service `foo` using the `nano` editor + ``` sudo 66 configure -e nano foo ``` See the the defined environment variable of the service `foo` from the `0.1.6` version + ``` 66 configure -s 0.1.6 -L foo ``` List the defined environment variables of the service `barz` of the module `foo@foobar` + ``` 66 configure -L foo@foobar:barz ``` diff --git a/doc/disable.md b/doc/disable.md index bc891bd62ea1ee359f3a765db426e112d448c253..0a9b77302d00ec6eeab2b2ef3adb51677e2d5c03 100644 --- a/doc/disable.md +++ b/doc/disable.md @@ -36,16 +36,19 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Disable the service + ``` 66 disable foo ``` Disable an intanced service + ``` 66 disable foo@foobar ``` Disable and stop the service, also increase the default verbosity: + ``` 66 -v3 disable -S foo ``` diff --git a/doc/enable.md b/doc/enable.md index fb0b77135c5abd27caa84d43d495467066d7cc2d..ccb2ac3e7066883c35bfae4ad40a8131e7906f67 100644 --- a/doc/enable.md +++ b/doc/enable.md @@ -36,16 +36,19 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Enable a service while specifying with the tree name(this only takes effect if the service has not been parsed before): + ``` 66 -t treeA enable foo ``` Enable an instanced service: + ``` 66 enable foo@foobar ``` Enable and start the service, also increase the default verbosity: + ``` 66 -v3 enable -S foo ``` diff --git a/doc/halt.md b/doc/halt.md index 944c9d817aa2d293cd3ef22361ece95568bce572..505f138a4abaede0c0769cb964038cb58529d909 100644 --- a/doc/halt.md +++ b/doc/halt.md @@ -38,21 +38,25 @@ The *when* provided **must be** on these formats: ## Usage examples Halts the system. + ``` 66 halt ``` Halts a broken system + ``` 66 halt -f ``` Halts the system after 10 minutes + ``` 66 halt 10 ``` Sends an "system will be halted in 10 minutes" to connected account and halt the system after 10 minutes + ``` 66 halt -m "system will be halted in 10 minutes" 10 ``` diff --git a/doc/index.md b/doc/index.md index e67ce03eeb86b01b08694ea8c892d80b5701279f..7161d2dcdde6874c51ecb697325f36b2cc3435ca 100644 --- a/doc/index.md +++ b/doc/index.md @@ -50,37 +50,7 @@ See [changes](upgrade.html) between version. ## Commands -### Debug command - -- [parse](parse.html) -- [resolve](resolve.html) -- [state](state.html) - -### Admin command - -- [boot](boot.html) -- [scandir](scandir.html) -- [init](init.html) -- [signal](signal.html) - -### User command - -- [start](start.html) -- [stop](stop.html) -- [enable](enable.html) -- [disable](disable.html) -- [reload](reload.html) -- [restart](restart.html) -- [status](status.html) -- [configure](configure.html) -- [reconfigure](reconfigure.html) -- [remove](remove.html) -- [free](free.html) -- [tree](tree.html) -- [poweroff](poweroff.html) -- [reboot](reboot.html) -- [halt](halt.html) -- [version](version.html) +- [66](66.html) ### Extra tools diff --git a/doc/init.md b/doc/init.md index 7bb34739a27a2594c917a4cb7cef357ae67b5b58..9fe92fae4daf7c3a2a8230d59b186a9221f1a412 100644 --- a/doc/init.md +++ b/doc/init.md @@ -37,6 +37,7 @@ Users, even system administrator, should not need to directly invoke this comman ## Usage examples Initiates services of tree `treefoo` + ``` 66 init treefoo -``` +``` \ No newline at end of file diff --git a/doc/module-usage.md b/doc/module-usage.md index cc8dfcfd4250a1ead208b05105d181fafcb310ec..68e85977b551abf0c1ba921c1ac639fc9008b3fb 100644 --- a/doc/module-usage.md +++ b/doc/module-usage.md @@ -12,6 +12,7 @@ author: Eric Vidal <eric@obarun.org> This documentation describe how to use *module* from an user point of view. If you want to create a *module*, refers to [service module creation](module-creation.html) page. A *module* is a [instantiated service](instantiated-service.html) and can be managed like any other instantiated services. For intance, to [start](start.html) it + ``` 66 start foo@bar ``` @@ -19,16 +20,19 @@ A *module* is a [instantiated service](instantiated-service.html) and can be man where `foo@` is the name of the *module* and `bar` the name of its intance. If the *module* was never parsed before, you will get the default configuration define by the developer of the *module* service. Obviously you can [enable](enable.html) it + ``` 66 enable foo@bar ``` or makes these two operations in one pass + ``` 66 enable -S foo@bar ``` The advantage of a *module* reside in the facts that you can [configure](configure.html) the *module* according to your needs. To do so, + ``` 66 configure foo@bar ``` @@ -36,6 +40,7 @@ The advantage of a *module* reside in the facts that you can [configure](configu This command allow you to change the environment variable of the *module* and so, its configuration. Now, you need to apply the changes + ``` 66 reconfigure foo@bar ``` @@ -45,16 +50,19 @@ The *module* should now use your configuration. The [reconfigure](reconfigure.ht # Manage service within *module* As *module* is a set of services, when you start it, several services may be started. You can get the list of the services within *module* using the [status](status.html) command. + ``` 66 status foo@bar ``` The command display different field notably the `contents` field corresponding to the list of the service within the *module*. You can control the state of these service like you do for any other services applying the following syntax + ``` 66 <command> <module_name>:<service_name> ``` For example, if `foo@bar` contain the service `baz` + ``` 66 stop foo@bar:baz ``` @@ -62,6 +70,7 @@ For example, if `foo@bar` contain the service `baz` Simply separates the name of the *module* and the name of the service by a colon `:`. A *module* can contain instantiated service. In this case use the same syntax specifying the complete name of the instantiated service. If `foo@bar` contain the instantiated service `bar@bou`, do + ``` 66 reload foo@bar:bar@bou ``` \ No newline at end of file diff --git a/doc/parse.md b/doc/parse.md index 1c4a2439be49fd28fbf75efb52ac96e771ca8bca..270c663f5777c8d29bdfbc63b5cc0626ed444c0c 100644 --- a/doc/parse.md +++ b/doc/parse.md @@ -42,21 +42,25 @@ However, a system administrator might want to parse a service frontend file unde ## Usage examples Parses the frontend file of `foo` service + ``` 66 parse foo ``` Parses the frontend file of `foo` service without importing `key=value` pair previous configuration file + ``` 66 parse -I foo ``` Force to parse again an existing parsing result of `foo` service + ``` 66 parse -f foo ``` Parses the frontend file of `foo` service specifying the localization of the frontend file + ``` 66 parse %%service_adm%%/foo -``` +``` \ No newline at end of file diff --git a/doc/poweroff.md b/doc/poweroff.md index 7d41d17ca0e2e8dc1d98c085a8e9260001d41822..c41afcdbd636a1a064135d16a9d91c6037feb31d 100644 --- a/doc/poweroff.md +++ b/doc/poweroff.md @@ -38,21 +38,25 @@ The *when* provided **must be** on these formats: ## Usage examples Shuts down the system. + ``` 66 poweroff ``` Shuts down a broken system + ``` 66 poweroff -f ``` Shuts down the system after 10 minutes + ``` 66 poweroff 10 ``` Sends an "system will be shutted down in 10 minutes" to connected account and shuts down the system after 10 minutes + ``` 66 poweroff -m "system will be shutted down in 10 minutes" 10 ``` diff --git a/doc/reboot.md b/doc/reboot.md index b505da95c236ed17793c7e5273cdb2e65ba6b88c..39bfd515ec218224d14aad69fff21cd73a8a0382 100644 --- a/doc/reboot.md +++ b/doc/reboot.md @@ -38,21 +38,25 @@ The *when* provided **must be** on these formats: ## Usage examples reboots the system. + ``` 66 reboot ``` reboots a broken system + ``` 66 reboot -f ``` reboots the system after 10 minutes + ``` 66 reboot 10 ``` Sends an "system will be rebooted in 10 minutes" to connected account and reboot the system after 10 minutes + ``` 66 reboot -m "system will be rebooted in 10 minutes" 10 ``` diff --git a/doc/reconfigure.md b/doc/reconfigure.md index c93dcea1a2db52329d66acee0104933460d1a84a..832b0af00282b01ea318c081fbe011bb34d20c39 100644 --- a/doc/reconfigure.md +++ b/doc/reconfigure.md @@ -36,11 +36,13 @@ This command handles [interdependencies](66.html#handling-dependencies) for the ## Usage examples Reconfigures the `foo` service + ``` 66 reconfigure foo ``` Reconfigures the `foo@bar` module service + ``` 66 reconfigure foo@bar ``` \ No newline at end of file diff --git a/doc/reload.md b/doc/reload.md index 6b0bc5f855fa473c629b032cb21b4988d80c25d5..5a9c374597e8348870281d65a27e27f5e18ffa05 100644 --- a/doc/reload.md +++ b/doc/reload.md @@ -38,11 +38,13 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Reloads the `foo` service + ``` 66 reload foo ``` Reloads the `foo-log` service + ``` 66 reload -P foo-log ``` diff --git a/doc/remove.md b/doc/remove.md index 5f48c6d732734f4668c91a5e5f45359f226bdfce..b117e978d441d854646dd5a64618e05cf9c77df7 100644 --- a/doc/remove.md +++ b/doc/remove.md @@ -34,11 +34,13 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage example Removes the service `foo` + ``` 66 remove foo ``` Removes the service `foo` without touching its interdependencies + ``` 66 remove -P foo -``` +``` \ No newline at end of file diff --git a/doc/resolve.md b/doc/resolve.md index 18af178a885c2884c5b26332c07d1a84fe6d5adf..ac95579d27623c87cb7f64a1655316c0ddff4cf3 100644 --- a/doc/resolve.md +++ b/doc/resolve.md @@ -28,6 +28,7 @@ This command displays the contents of the service's *resolve* file. This file ar ## Usage example Displays the *resolve* file of service `foo` + ``` 66 resolve foo ``` \ No newline at end of file diff --git a/doc/restart.md b/doc/restart.md index 036201a3d7221c2533e8d3b2d2b5486a220e6f97..7d104566176883ae9a8e0b24bfb03ed7b759c776 100644 --- a/doc/restart.md +++ b/doc/restart.md @@ -36,11 +36,13 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Restarts the `foo` service + ``` 66 restart foo ``` Restarts the `foo` service without handling its required-by dependencies + ``` 66 restart -P foo ``` \ No newline at end of file diff --git a/doc/scandir.md b/doc/scandir.md index e40c50a58aa1a01fa22e83b2fecde6ac780894ee..ef85e14c45869f2505362076a4ed03cee2784b64 100644 --- a/doc/scandir.md +++ b/doc/scandir.md @@ -227,11 +227,13 @@ scandir reload [ -h ] #### Usage examples Reloads a running *scandir*. + ``` 66 scandir reload ``` Reloads a *scandir* for the owner `owner` + ``` 66 scandir -o owner reload ``` @@ -255,11 +257,13 @@ scandir check [ -h ] #### Usage examples Checks a *scandir* + ``` 66 scandir check ``` Checks a *scandir* for the owner `owner` + ``` 66 scandir -o owner check ``` @@ -283,11 +287,13 @@ scandir quit [ -h ] #### Usage examples Quits a *scandir* running *scandir*. + ``` 66 scandir quit ``` Quits a *scandir* for the owner `owner` + ``` 66 scandir -o owner quit ``` @@ -311,11 +317,13 @@ scandir abort [ -h ] #### Usage examples Aborts a *scandir* + ``` 66 scandir abort ``` Aborts a *scandir* for the owner `owner` + ``` 66 scandir -o owner abort ``` @@ -338,11 +346,13 @@ scandir nuke [ -h ] #### Usage examples Kill s6-supervise processes from a *scandir* + ``` 66 scandir nuke ``` Kill s6-supervise processes from a *scandir* for the owner `owner` + ``` 66 scandir -o owner nuke ``` @@ -366,11 +376,13 @@ Does the same thing as [nuke](#nuke), except that `SIGTERM` is sent to all the r #### Usage examples Annihilates a *scandir* + ``` 66 scandir annihilate ``` Annihilates a *scandir* for the owner `owner` + ``` 66 scandir -o owner annihilate ``` @@ -394,11 +406,13 @@ Immediately triggers s6-svscan's reaper mechanism. #### Usage examples Removes zombies from a *scandir* + ``` 66 scandir zombies ``` Removes zombies from a *scandir* for the owner `owner` + ``` 66 scandir -o owner zombies ``` diff --git a/doc/signal.md b/doc/signal.md index d097f0bb0c8ea41cf4b362f3de76c7a27b794aad..10f33ea65bf1861b3a3c1ce77fd4be3da69bf0c5 100644 --- a/doc/signal.md +++ b/doc/signal.md @@ -59,26 +59,31 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Send a SIGHUP signal to `foo` + ``` 66 signal -H foo ``` Send a SIGHUP signal to `foo` by signal name + ``` 66 signal -s SIGHUP foo ``` Triggers a log rotation of `foo-log` + ``` 66 signal -a -P foo-log ``` Take down `foo` and block until the process is down and the finish script has completed + ``` 66 signal -wD -d foo ``` Bring up `foo` and block until it has sent notification that it is ready. Exit if it is still not ready after 5 seconds. + ``` 66 -T 5000 -wU -u foo -``` +``` \ No newline at end of file diff --git a/doc/start.md b/doc/start.md index 34bc34bae11d0c9096d9341b1d59294bc73c2c19..88af6e3888786b3ced60eceb1387be8a9e2d09e1 100644 --- a/doc/start.md +++ b/doc/start.md @@ -38,16 +38,19 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples Start a service handling its dependencies. + ``` 66 start foo ``` Start the service without handling any dependencies + ``` 66 start -P foo ``` Start a *service* in a specific *tree* if the service was never parsed + ``` 66 -t treeA start foo ``` diff --git a/doc/state.md b/doc/state.md index f1f6e234e0273dacdf7511b078d0748ea845e4ab..a30599733b510bdb76c1fc776fb7cda2931c05d7 100644 --- a/doc/state.md +++ b/doc/state.md @@ -26,6 +26,7 @@ This command displays the contents of the service's *state* file. This file are ## Usage example Display state of service `foo` + ``` 66 state foo -``` +``` \ No newline at end of file diff --git a/doc/status.md b/doc/status.md index ba9b5486fc01f8fd10682d50edaf9efcf540159c..f37c87f364b4401ba0caa4645770f40b87066017 100644 --- a/doc/status.md +++ b/doc/status.md @@ -66,31 +66,37 @@ Without specifying the `-o`, all fields are displayed. ## Usage examples Displays all information of service `foo` + ``` 66 status foo ``` Only displays the field `name` and `status` of service `foo` + ``` 66 status -o name,status foo ``` Also, do not display the name of the field `name` and `status` of service `foo` + ``` 66 status -no name,status foo ``` Only displays the contents of the log file of the service `foo` + ``` 66 status -o logfile foo ``` Also, displays the last 100 lines of the log file of the service `foo` + ``` 66 status -o logfile -p100 foo ``` In a script you can do + ``` #!/bin/sh @@ -107,6 +113,7 @@ fi ``` Displays information of the service using the graph mode + ``` 66 status -g dbus diff --git a/doc/stop.md b/doc/stop.md index 66f7208c075af7d6a852db806632bfa667b81a44..0f06980805d1f3362ab6b17ebdd6347eaef50fec 100644 --- a/doc/stop.md +++ b/doc/stop.md @@ -35,12 +35,14 @@ This command handles [interdependencies](66.html#handling-dependencies). ## Usage examples -Stop a service handling its required-by dependencies. +Stop a service handling its required-by dependencies + ``` 66 stop foo ``` Stop the service without handling any dependencies + ``` 66 stop -P foo ``` diff --git a/doc/tree.md b/doc/tree.md index ae181a7abdbfa7522c3d116b27d0eb0177db9a8b..cc1bbc8de025bbf2a538105b0f161ec71afbf42b 100644 --- a/doc/tree.md +++ b/doc/tree.md @@ -65,31 +65,37 @@ The functionality extends further: say, you now wish to watch a video, requiring ### Usage examples Create a non-existing *tree* named `network` + ``` 66 tree create network ``` Create a non-existing *tree* named `print` which depends on *tree* `network` and associated to the `admin` group + ``` 66 tree create -o depends=network:groups=admin print ``` Create a non-existing *tree* named `graphics` which depends on *tree* `network` + ``` 66 tree create -o depends=network graphics ``` Enables a *tree* called `network` + ``` 66 tree enable network ``` -Starts the *tree* called `print`. Any *enabled* services associated with this *tree* are brought up. +Starts the *tree* called `print`. Any *enabled* services associated with this *tree* are brought up + ``` 66 tree start print ``` -Stops the *tree* called `print`. Any running services will be stopped and unsupervised. +Stops the *tree* called `print`. Any running services will be stopped and unsupervised + ``` 66 tree free print ``` @@ -127,11 +133,13 @@ valid fields for `-o` options are: #### Usage examples Creates a tree named `treefoo` + ``` 66 tree create treefoo ``` Creates, configures and clones a *tree* named `treefoo` where the clone of `treefoo` is named `treefoo2` + ``` 66 tree create -o depends=treebar,treebaz:groups=admin:deny=none:allow=root:clone=treefoo2 treefoo ``` @@ -168,11 +176,13 @@ valid fields for `-o` options are: #### Usage examples Changes the dependencies of `treefoo` to `treebaz` where `treefoo` depended previously of tree `treebar` + ``` 66 tree admin -o depends=treebaz treefoo ``` Deny all user of `treefoo` + ``` 66 tree admin -o deny=user treefoo ``` @@ -197,6 +207,7 @@ Tree dependencies, including required-by dependencies, are managed. For instance #### Usage examples +Removes `treefoo` tree ``` 66 tree remove treefoo ``` @@ -224,6 +235,7 @@ This command handles [interdependencies](66.html#handling-dependencies). #### Usage examples Enables `treefoo` tree + ``` 66 tree enable treefoo ``` @@ -519,11 +531,13 @@ This command handles [interdependencies](66.html#handling-dependencies). #### Usage examples Stops and unsuperives all services from all enabled trees available on the system + ``` 66 tree stop ``` Stops and unsupervise all services of tree `treefoo` + ``` 66 tree stop treefoo ``` @@ -551,7 +565,8 @@ A `seed` file can be provided to automatically configure the tree during its cre The `seed` file name need to correspond to the name of the tree to be configured. -The following template is self-explained: +The following template is self-explained + ``` ## An empty field is not allowed. If the key is define, the value must exist and valid. ## In other case, simply comment it.