Blame view

restart_container.sh 299 Bytes
b1087939   hmalti   Ajout commandes
1
2
3
4
5
6
7
8
9
10
  #!/bin/bash
  NOM_CONTAINER=$3;
  NOM_IMAGE=$4;
  
  mount -t ext4 -o loop $PATH_BALEINE/containers/$NOM_CONTAINER/$NOM_IMAGE /mnt/baleine/$NOM_CONTAINER
  
  nohup unshare -p -f -m -n -u chroot /mnt/baleine/$NOM_CONTAINER $PROGRAM -c "mount /proc" &
  PID=$!
  
  ps axo ppid,pid | grep "^ *$PID" | sed -e 's/.* //'