We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa2a2a0 + ea5f306 commit 49dabafCopy full SHA for 49dabaf
modules/soc_vwid/main.sh
@@ -1,4 +1,18 @@
1
#!/bin/bash
2
+
3
+# -- start user pi enforcement
4
+# normally the soc module runs as user pi
5
+# When LP Configuration is stored, it is run as user www-data
6
+# This leads to various permission problems
7
+# if actual user is not pi, this section restarts the script as user pi
8
+usr=`id -nu`
9
+if [ "$usr" != "pi" ]
10
+then
11
+ sudo -u pi -c bash "$0 $*"
12
+ exit $?
13
+fi
14
+# -- ending user pi enforcement
15
16
OPENWBBASEDIR=$(cd `dirname $0`/../../ && pwd)
17
RAMDISKDIR="$OPENWBBASEDIR/ramdisk"
18
MODULEDIR=$(cd `dirname $0` && pwd)
0 commit comments