Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / protocols / winpopup / winpopup-install.sh
blob521671faf4575d126b23a34f5daab2d1afee9c05
1 #!/bin/bash
3 PATH=/bin:/usr/bin
5 # Grab the full path to the smb.conf file
6 i=`find /etc -name smb.conf`
8 # Create new smb.conf file with updated message command line
9 echo "[global]" > ~/smb.conf.new
10 echo " message command = $1 %s %m %t &" >> ~/smb.conf.new
11 cat $i | grep -v "message command = " | grep -v "\[global\]" >> ~/smb.conf.new
13 # Backup the old file
14 mv -f $i "$i.old"
16 # Move new file into place and reset permissions
17 mv -f ~/smb.conf.new $i
18 chown root:root $i
19 chmod 644 $i
21 # Create a winpopup directory somewhere "safe"
22 #rm -rf /var/lib/winpopup --- a bit strong?
23 if [ ! -d /var/lib/winpopup ]; then
24 mkdir -p /var/lib/winpopup
27 chmod 0777 /var/lib/winpopup
29 # This is to help if somebody grades up from the old behavior
30 if [ -n "`ls -A /var/lib/winpopup/`" ]; then
31 chmod 666 /var/lib/winpopup/*
34 rm -f /var/lib/winpopup/message
36 # Force Samba to reread configuration
37 killall -HUP smbd