summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.sh
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-01-24 08:58:57 -0800
committerGitHub <noreply@github.com>2018-01-24 08:58:57 -0800
commitf14d69b382978069321acdec9a434ca85ac137da (patch)
tree90cdd4df15614ffe022778f986d551a63959712e /lavalab-gen.sh
parent736fc3248108069d9f7d98fadc436aad3732dfab (diff)
parentc856c35e30f4465f8d14834d672a0dcbf06567fb (diff)
Merge pull request #13 from montjoie/bugfix
Bugfix
Diffstat (limited to 'lavalab-gen.sh')
-rwxr-xr-xlavalab-gen.sh13
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