Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +6 -5
entrypoint.sh
CHANGED
|
@@ -3,12 +3,13 @@
|
|
| 3 |
# exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
# start dbus
|
| 12 |
mkdir -p /run/dbus
|
| 13 |
if [ -f /run/dbus/pid ]; then
|
| 14 |
rm /run/dbus/pid
|
|
|
|
| 3 |
# exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
+
# Check if /dev/net/tun already exists, avoid creating it if it's already present
|
| 7 |
+
if [ ! -c /dev/net/tun ]; then
|
| 8 |
+
echo "/dev/net/tun not found, unable to create it as non-root user. Ensure the hosting environment provides the tun device."
|
| 9 |
+
exit 1
|
| 10 |
+
fi
|
| 11 |
|
| 12 |
+
# start dbus (if applicable)
|
| 13 |
mkdir -p /run/dbus
|
| 14 |
if [ -f /run/dbus/pid ]; then
|
| 15 |
rm /run/dbus/pid
|