From 47d54ddd9ab3634aa58315fe4e92d110a0609739 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 18 May 2016 19:19:11 +0200 Subject: Reworking container-autostart program into container auto command. Signed-off-by: Daniel Baumann --- share/config/container.conf.in | 2 +- share/man/container-auto.1.txt | 78 +++++++++++++++++++++++++++++++ share/scripts/debconf | 2 +- share/scripts/debootstrap | 2 +- share/systemd/container-auto.service | 15 ++++++ share/systemd/container-autostart.service | 15 ------ 6 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 share/man/container-auto.1.txt create mode 100644 share/systemd/container-auto.service delete mode 100644 share/systemd/container-autostart.service (limited to 'share') diff --git a/share/config/container.conf.in b/share/config/container.conf.in index 5ea342a..dd52adb 100644 --- a/share/config/container.conf.in +++ b/share/config/container.conf.in @@ -1,7 +1,7 @@ # container-tools: @NAME@ [start] -cnt.autostart=@CNT_AUTOSTART@ +cnt.auto=@CNT_AUTO@ cnt.network-bridge=@CNT_NETWORK_BRIDGE@ bind=@BIND@ boot=@BOOT@ diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt new file mode 100644 index 0000000..af2d3c7 --- /dev/null +++ b/share/man/container-auto.1.txt @@ -0,0 +1,78 @@ +// container-tools - Manage systemd-nspawn containers +// Copyright (C) 2014-2016 Daniel Baumann +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +CONTAINER-START(1) +================== +:doctype: manpage +:man manual: Open Infrastructure +:man source: container-tools +:man version: {revnumber} + + +NAME +---- +container-auto - Start/stop all container automatically at boot/shutdown + + +SYNOPSIS +-------- +*container auto* ['OPTIONS'] + + +DESCRIPTION +----------- +The container auto command starts or stops all container on the host system. + + +OPTIONS +------- +The following container options are available: + +*-s, --start*:: + Start all container on the host system. + +*-t, --stop*:: + Stop all container on the host system. + + +EXAMPLES +-------- +*Start all container on the host system:*:: + sudo container auto --start + +*Stop all container on the host system:*:: + sudo container auto --stop + + +SEE ALSO +-------- +container-tools(7), +container(1). + + +HOMEPAGE +-------- +More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. + + +BUGS +---- +Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. + + +AUTHORS +------- +container-tools was written by Daniel Baumann . diff --git a/share/scripts/debconf b/share/scripts/debconf index 3bacbeb..55c2b8b 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -46,7 +46,7 @@ Parameters () shift 2 ;; - --cnt.autostart) + --cnt.auto) # ignore shift 2 ;; diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index 208e050..0a9e733 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -45,7 +45,7 @@ Parameters () shift 2 ;; - --cnt.autostart) + --cnt.auto) # ignore shift 2 ;; diff --git a/share/systemd/container-auto.service b/share/systemd/container-auto.service new file mode 100644 index 0000000..e9addd7 --- /dev/null +++ b/share/systemd/container-auto.service @@ -0,0 +1,15 @@ +[Unit] +Description=container-tools automatic start +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/container auto --start +ExecStop=/usr/bin/container auto --stop +Delegate=yes +StandardOutput=syslog +StandardError=syslog + +[Install] +WantedBy=multi-user.target diff --git a/share/systemd/container-autostart.service b/share/systemd/container-autostart.service deleted file mode 100644 index 076aa41..0000000 --- a/share/systemd/container-autostart.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=container-tools automatic start -After=network.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/container-autostart -#ExecStop= -Delegate=yes -StandardOutput=syslog -StandardError=syslog - -[Install] -WantedBy=multi-user.target -- cgit v1.2.3