summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.sh
diff options
context:
space:
mode:
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