summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/winpopup/winpopup-install.sh
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/winpopup/winpopup-install.sh
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/winpopup/winpopup-install.sh')
-rwxr-xr-xkopete/protocols/winpopup/winpopup-install.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/kopete/protocols/winpopup/winpopup-install.sh b/kopete/protocols/winpopup/winpopup-install.sh
new file mode 100755
index 00000000..3106b064
--- /dev/null
+++ b/kopete/protocols/winpopup/winpopup-install.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin
+
+# Grab the full path to the smb.conf file
+i=`find /etc -name smb.conf`
+
+# Create new smb.conf file with updated message command line
+echo "[global]" > ~/smb.conf.new
+echo " message command = $1 %s %m %t &" >> ~/smb.conf.new
+cat $i | grep -v "message command = " | grep -v "\[global\]" >> ~/smb.conf.new
+
+# Backup the old file
+mv -f $i "$i.old"
+
+# Move new file into place and reset permissions
+mv -f ~/smb.conf.new $i
+chown root:root $i
+chmod 644 $i
+
+# Create a winpopup directory somewhere "safe"
+#rm -rf /var/lib/winpopup --- a bit strong?
+if [ ! -d /var/lib/winpopup ]; then
+ mkdir -p /var/lib/winpopup
+fi
+
+chmod 0777 /var/lib/winpopup
+
+# This is to help if somebody grades up from the old behavior
+if [ -n "`ls -A /var/lib/winpopup/`" ]; then
+ chmod 666 /var/lib/winpopup/*
+fi
+
+rm -f /var/lib/winpopup/message
+
+# Force Samba to reread configuration
+killall -HUP smbd