3e470988
hmalti
First commit
|
1
|
#!/bin/bash
|
17bfc359
hmalti
Help Image+contai...
|
2
|
if [ $# -lt 1 ]; then
|
bc091391
hmalti
help + README
|
3
4
|
printf "NOM\n"
printf "\t Container\n"
|
17bfc359
hmalti
Help Image+contai...
|
5
|
printf "SYNOPSIS \n"
|
bc091391
hmalti
help + README
|
6
|
printf "\t baleine container <COMMANDES> [arguments]\n"
|
17bfc359
hmalti
Help Image+contai...
|
7
|
printf "Description: \n \n"
|
bc091391
hmalti
help + README
|
8
|
printf "\t La commande 'Container' permet de créer des conteneurs, en supprimer, lister les conteneurs existants (Son nom, son image, son bridge, son PID, son starting time ) \n"
|
17bfc359
hmalti
Help Image+contai...
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
printf "Les commandes sont :\n \n"
printf "\t %-10s %-10s \n" "<create>" "crée un conteneur."
printf "\t \t [-i], [NOM_IMAGE]\n \n"
printf "\t \t [-c], [NOM_CONTAINER]\n \n"
printf "\t \t [-b], [NOM_BRIDGE]\n \n"
printf "\t \t [-r], [REPERTOIRE]\n \n"
printf "\t \t [-a], [ADDRE_IPV4]\n \n"
printf "\t \t [-p], [NOM_PROGRAMME]\n \n"
printf " \t %-10s %-10s \n" "<list> " "liste les conteneurs existants ainsi que leurs manifestes."
printf " \t %-10s %-10s \n" "<remove> " "Supprime le conteneur donné en argument."
printf "\t \t [-c], --container [NOM_CONTAINER]\n \n"
printf "\t \t %-10s %-10s \n" "<exec> " "Exécute au lancement du conteneur un bash."
printf "\t \t [-c], --container [NOM_CONTAINER]\n \n"
printf "\t %-10s %-10s \n" "<stop> " "Stop le conteneur donné en argument."
printf "\t \t [-c], --container [NOM_CONTAINER]\n \n"
|
17bfc359
hmalti
Help Image+contai...
|
24
25
|
printf "Utilisez baleine <commande> help pour plus d'informations à propos d'une commande.\n"
fi
|
3e470988
hmalti
First commit
|
26
|
|
5721892d
hmalti
Avancées
|
27
|
case $1 in
|
3e470988
hmalti
First commit
|
28
29
30
|
"create")
#Si on veut creer un container (qu'on a apellé le script ./baleine.sh container create)
|
5721892d
hmalti
Avancées
|
31
|
bash create_container.sh "${@:2}"
|
3e470988
hmalti
First commit
|
32
33
34
|
;;
"list")
#Si on veut lister les containers qui tournent (qu'on a apellé le script ./baleine.sh container list)
|
5721892d
hmalti
Avancées
|
35
|
bash list_container.sh "${@:2}"
|
3e470988
hmalti
First commit
|
36
37
|
;;
"stop")
|
5721892d
hmalti
Avancées
|
38
|
bash stop_container.sh "${@:2}"
|
3e470988
hmalti
First commit
|
39
|
;;
|
b1087939
hmalti
Ajout commandes
|
40
|
"remove")
|
5721892d
hmalti
Avancées
|
41
|
bash remove_container.sh "${@:2}"
|
b1087939
hmalti
Ajout commandes
|
42
|
;;
|
5161dfdb
hmalti
Améliorations scr...
|
43
|
"exec")
|
5721892d
hmalti
Avancées
|
44
|
bash exec_container.sh "${@:2}"
|
5161dfdb
hmalti
Améliorations scr...
|
45
|
;;
|
3e470988
hmalti
First commit
|
46
47
|
esac
|