diff options
author | khilman <khilman@users.noreply.github.com> | 2018-01-24 08:58:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 08:58:57 -0800 |
commit | f14d69b382978069321acdec9a434ca85ac137da (patch) | |
tree | 90cdd4df15614ffe022778f986d551a63959712e /lavalab-gen.sh | |
parent | 736fc3248108069d9f7d98fadc436aad3732dfab (diff) | |
parent | c856c35e30f4465f8d14834d672a0dcbf06567fb (diff) |
Merge pull request #13 from montjoie/bugfix
Bugfix
Diffstat (limited to 'lavalab-gen.sh')
-rwxr-xr-x | lavalab-gen.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lavalab-gen.sh b/lavalab-gen.sh index 06df881..26cbc23 100755 --- a/lavalab-gen.sh +++ b/lavalab-gen.sh @@ -13,8 +13,15 @@ fi ./lavalab-gen.py || exit 1 -rm /etc/udev/rules.d/lavalab*rules -cp lavalab*rules /etc/udev/rules.d/ +#check for root +BEROOT="" +if [ $(id -u) -ne 0 ];then + BEROOT="sudo " +fi +$BEROOT rm /etc/udev/rules.d/*lavalab*rules +$BEROOT cp *lavalab*rules /etc/udev/rules.d/ +$BEROOT udevadm control --reload-rules || exit $? +$BEROOT udevadm trigger || exit $? docker-compose build || exit 1 -docker-compose up || exit 1 +docker-compose up -d || exit 1 |