refactor(mpris): Remove socat service in favor of simplified dbus connection

Can connect to dbus over TCP socket using ENV which is much simpler.
This commit is contained in:
FoxxMD 2025-07-08 19:53:55 +00:00
parent 0efc85c516
commit 8dfc9a6d55
5 changed files with 0 additions and 33 deletions

View file

@ -1,10 +0,0 @@
#!/usr/bin/with-contenv bash
if [ $1 -ne 0 ]; then
echo -e "-------------------------------------\n"
echo -e "socat failed to start! It will NOT restart\n"
echo -e "-------------------------------------\n"
fi
# signal to s6 this service should not be re-run
exit 125

View file

@ -1,22 +0,0 @@
#!/usr/bin/with-contenv bash
if [ ! -z "$SOCAT_PORT" ]; then
user_id=$(id -u abc)
path="/run/user/$user_id/bus"
echo -e "Starting socat for uid $user_id at unix scoket $path and listening on port $SOCAT_PORT"
# on host do
# socat TCP-LISTEN:$SOCAT_PORT,reuseaddr,fork UNIX-CONNECT:/run/user/$user_id/bus
mkdir -p /run/user/$user_id
touch /run/user/$user_id/bus
chmod 666 /run/user/$user_id/bus
chown -R abc:abc /run/user/$user_id
exec \
s6-setuidgid abc socat UNIX-LISTEN:/run/user/$user_id/bus,fork,reuseaddr,unlink-early,user=abc,group=abc,mode=666 TCP:0.0.0.0:$SOCAT_PORT
else
echo "Not starting socat"
fi

View file

@ -1 +0,0 @@
longrun