diff options
Diffstat (limited to '')
-rwxr-xr-x | libexec/container/auto (renamed from lib/container/auto) | 7 | ||||
-rwxr-xr-x | libexec/container/console (renamed from lib/container/console) | 5 | ||||
-rwxr-xr-x | libexec/container/create (renamed from lib/container/create) | 11 | ||||
-rwxr-xr-x | libexec/container/enter (renamed from lib/container/enter) | 5 | ||||
-rwxr-xr-x | libexec/container/key (renamed from lib/container/key) | 5 | ||||
-rwxr-xr-x | libexec/container/limit (renamed from lib/container/limit) | 5 | ||||
-rwxr-xr-x | libexec/container/list (renamed from lib/container/list) | 7 | ||||
-rwxr-xr-x | libexec/container/log (renamed from lib/container/log) | 25 | ||||
-rwxr-xr-x | libexec/container/move (renamed from lib/container/move) | 7 | ||||
-rwxr-xr-x | libexec/container/remove (renamed from lib/container/remove) | 7 | ||||
-rwxr-xr-x | libexec/container/restart (renamed from lib/container/restart) | 5 | ||||
-rwxr-xr-x | libexec/container/run (renamed from lib/container/run) | 5 | ||||
-rwxr-xr-x | libexec/container/start (renamed from lib/container/start) | 7 | ||||
-rwxr-xr-x | libexec/container/status (renamed from lib/container/status) | 7 | ||||
-rwxr-xr-x | libexec/container/stop (renamed from lib/container/stop) | 7 | ||||
-rwxr-xr-x | libexec/container/top (renamed from lib/container/top) | 3 | ||||
-rwxr-xr-x | libexec/container/version (renamed from lib/container/version) | 7 |
17 files changed, 81 insertions, 44 deletions
diff --git a/lib/container/auto b/libexec/container/auto index 6c1d47b..0c9d136 100755 --- a/lib/container/auto +++ b/libexec/container/auto @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" Parameters () { diff --git a/lib/container/console b/libexec/container/console index 2dc6546..ce53712 100755 --- a/lib/container/console +++ b/libexec/container/console @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/create b/libexec/container/create index bdf9fb4..418bc35 100755 --- a/lib/container/create +++ b/libexec/container/create @@ -15,19 +15,20 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" -SCRIPTS="/usr/share/${PROJECT}/${PROGRAM}/scripts" -CONFIG_TEMPLATE="/usr/share/${PROJECT}/${PROGRAM}/config/container.conf.in" +SCRIPTS="/usr/share/${SOFTWARE}/scripts" +CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in" Parameters () { diff --git a/lib/container/enter b/libexec/container/enter index fed1193..2664fdc 100755 --- a/lib/container/enter +++ b/libexec/container/enter @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/key b/libexec/container/key index 4cbdaa0..5f76fb2 100755 --- a/lib/container/key +++ b/libexec/container/key @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -KEYS="/etc/${PROJECT}/${PROGRAM}/keys" +KEYS="/etc/${SOFTWARE}/keys" Parameters () { diff --git a/lib/container/limit b/libexec/container/limit index 99ef03a..6323a42 100755 --- a/lib/container/limit +++ b/libexec/container/limit @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/list b/libexec/container/list index ba794ab..30446c0 100755 --- a/lib/container/list +++ b/libexec/container/list @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" VERSION="$(${PROGRAM} version)" diff --git a/lib/container/log b/libexec/container/log index a18c421..e514391 100755 --- a/lib/container/log +++ b/libexec/container/log @@ -15,15 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -LOG="/var/log/${PROJECT}/${PROGRAM}.log" +HOOKS="/etc/${SOFTWARE}/hooks" +LOG="/var/log/${SOFTWARE}/${PROGRAM}.log" Parameters () { @@ -79,6 +81,16 @@ Usage () Parameters "${@}" +# Pre hooks +for FILE in "${HOOKS}/pre-${COMMAND}".* +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done + +# Run case "${DATE}" in today-*) DAYS="$(echo ${DATE} | awk -F- '{ print $2 }')" @@ -141,3 +153,12 @@ do ;; esac done + +# Post hooks +for FILE in "${HOOKS}/post-${COMMAND}".* +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done diff --git a/lib/container/move b/libexec/container/move index e20d8a8..a76cde1 100755 --- a/lib/container/move +++ b/libexec/container/move @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/remove b/libexec/container/remove index 75ebd60..3205c32 100755 --- a/lib/container/remove +++ b/libexec/container/remove @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/restart b/libexec/container/restart index 3c84f4d..922629d 100755 --- a/lib/container/restart +++ b/libexec/container/restart @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/run b/libexec/container/run index f6323c0..bf8d0a7 100755 --- a/lib/container/run +++ b/libexec/container/run @@ -15,15 +15,16 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/start b/libexec/container/start index 30aee53..089aa7d 100755 --- a/lib/container/start +++ b/libexec/container/start @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" START="false" diff --git a/lib/container/status b/libexec/container/status index a4b49e1..9c3a076 100755 --- a/lib/container/status +++ b/libexec/container/status @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" Parameters () diff --git a/lib/container/stop b/libexec/container/stop index 6b8caee..58fc0e9 100755 --- a/lib/container/stop +++ b/libexec/container/stop @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/${PROJECT}/${PROGRAM}/config" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +CONFIG="/etc/${SOFTWARE}/config" +HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" CLEAN="false" diff --git a/lib/container/top b/libexec/container/top index d9baa1c..c846000 100755 --- a/lib/container/top +++ b/libexec/container/top @@ -15,11 +15,12 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" diff --git a/lib/container/version b/libexec/container/version index c2b7716..3b33a4d 100755 --- a/lib/container/version +++ b/libexec/container/version @@ -15,16 +15,17 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e PROJECT="open-infrastructure" +SOFTWARE="compute-tools" PROGRAM="container" COMMAND="$(basename ${0})" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" -SHARE="/usr/share/${PROJECT}/${PROGRAM}" +HOOKS="/etc/${SOFTWARE}/hooks" +SHARE="/usr/share/${SOFTWARE}" # Pre hooks for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}" |