forked from kohlerm/docker-pidgin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsipe-collab
executable file
·25 lines (22 loc) · 893 Bytes
/
sipe-collab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
eth_ints="eth0 enp0s25"
wlan_int="wlo1"
#localip=$(hostname -i 2>/dev/null |tr -d " " )
for eth_int in $eth_ints
do
[ -z $localip ] && localip=$(ip a s $eth_int|grep "inet "|awk '{print $2}'|cut -d"/" -f1)
if [ "$localip" = "" ]
then
localip=$(ip a s $wlan_int|grep "inet "|awk '{print $2}'|cut -d"/" -f1)
#[ "$localip" = "" ] && localip=$(ip a s wlo1|grep "inet "|awk '{print $2}'|cut -d"/" -f1)
fi
done
log=/tmp/sipe-collab.log
date > $log
xhost + >> $log 2>&1
pulseaudio -k --start >> $log 2>&1
echo STart Sipe Collab Container >> $log 2>&1
docker run -d --net=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -e \
PULSE_SERVER=tcp:$localip:4713 -e PULSE_COOKIE=/run/pulse/cookie -v \
~/.config/pulse/cookie:/run/pulse/cookie -v /home/$USER/.purple:/root/.purple \
zioalex/sipe-collab:current >> $log 2>&1