github.com/schwarzm/garden-linux@v0.0.0-20150507151835-33bca2147c47/old/linux_backend/skeleton/start.sh (about)

     1  #!/bin/bash
     2  
     3  [ -n "$DEBUG" ] && set -o xtrace
     4  set -o nounset
     5  set -o errexit
     6  shopt -s nullglob
     7  
     8  cd $(dirname $0)
     9  
    10  source ./etc/config
    11  
    12  if [ -f ./run/wshd.pid ]
    13  then
    14    echo "wshd is already running..."
    15    exit 1
    16  fi
    17  
    18  ./net.sh setup
    19  
    20  if [ "$root_uid" -eq 0 ]
    21  then
    22    ./bin/wshd --run ./run --lib ./lib --root $rootfs_path --title "wshd: $id" --userns disabled
    23  else
    24    ./bin/wshd --run ./run --lib ./lib --root $rootfs_path --title "wshd: $id" --userns enabled
    25  fi