mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-04-26 10:51:06 +00:00
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:
parent
0efc85c516
commit
8dfc9a6d55
5 changed files with 0 additions and 33 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
longrun
|
||||
Loading…
Add table
Add a link
Reference in a new issue