Skip to content

Commit 72f29ae

Browse files
committed
feat: properly create /tmp/.X11-unix
1 parent f376354 commit 72f29ae

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

scripts/apps/uptime-kuma-2/ampstart.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ echo "[Info] AMPStart for Docker"
66
ARCH=$(uname -m)
77

88
# Context check
9-
[ -z "${AMPUSERID}" ] && { echo "[Error] This docker image cannot be used directly by itself - it must be started by ampinstmgr"; exit 100; }
9+
[[ -z "${AMPUSERID}" ]] && { echo "[Error] This docker image cannot be used directly by itself - it must be started by ampinstmgr"; exit 100; }
1010

1111
# Create /etc/machine-id (addresses Proton/dbus issues)
1212
mkdir -p /var/lib/dbus
1313
rm -f /etc/machine-id /var/lib/dbus/machine-id
1414
dbus-uuidgen --ensure=/etc/machine-id
1515
ln -s /etc/machine-id /var/lib/dbus/machine-id
1616

17+
# Create /tmp/.X11-unix (for Xvfb etc)
18+
install -d -o root -g root -m 1777 /tmp/.X11-unix
19+
1720
# Set up amp user and group
1821
: "${AMPUSERID:?AMPUSERID not set}"
1922
: "${AMPGROUPID:?AMPGROUPID not set}"

scripts/base/ampstart.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ echo "[Info] AMPStart for Docker"
66
ARCH=$(uname -m)
77

88
# Context check
9-
[ -z "${AMPUSERID}" ] && { echo "[Error] This docker image cannot be used directly by itself - it must be started by ampinstmgr"; exit 100; }
9+
[[ -z "${AMPUSERID}" ]] && { echo "[Error] This docker image cannot be used directly by itself - it must be started by ampinstmgr"; exit 100; }
1010

1111
# Create /etc/machine-id (addresses Proton/dbus issues)
1212
mkdir -p /var/lib/dbus
1313
rm -f /etc/machine-id /var/lib/dbus/machine-id
1414
dbus-uuidgen --ensure=/etc/machine-id
1515
ln -s /etc/machine-id /var/lib/dbus/machine-id
1616

17+
# Create /tmp/.X11-unix (for Xvfb etc)
18+
install -d -o root -g root -m 1777 /tmp/.X11-unix
19+
1720
# Set up amp user and group
1821
: "${AMPUSERID:?AMPUSERID not set}"
1922
: "${AMPGROUPID:?AMPGROUPID not set}"

0 commit comments

Comments
 (0)