summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-scripts/system-cleanup.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-08-30 22:24:02 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-08-30 22:24:02 (GMT)
commitc4bd4457b5d640e1c8f5afbca7cd54c53691e5fc (patch)
treef4e4f7a91e1d9d90033fd99d89e5e26a2c144528 /abs/core/linhes-scripts/system-cleanup.sh
parent0e7b327a1ae444233f1308a95420f70540ad74a3 (diff)
downloadlinhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.zip
linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.gz
linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.bz2
RSYNC CORE:
resync core-testing -> core Signed-off-by: James Meyer <james.meyer@operamail.com>
Diffstat (limited to 'abs/core/linhes-scripts/system-cleanup.sh')
-rwxr-xr-xabs/core/linhes-scripts/system-cleanup.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/abs/core/linhes-scripts/system-cleanup.sh b/abs/core/linhes-scripts/system-cleanup.sh
new file mode 100755
index 0000000..59a4ebb
--- /dev/null
+++ b/abs/core/linhes-scripts/system-cleanup.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# This script cleans up some SVN stuff that the build process leaves
+# in /usr/share/mythtv, along with ownership and file permsisions on the
+# themes and the mythstream stuff. There are bunch of files which are
+# left executable for no good reason, although I can think of several
+# potentially bad reasons for it.
+
+find /usr/share/mythtv -name .svn -print0 | xargs -0 rm -rf
+find /usr/share/mythtv -name CVS -print0 | xargs -0 rm -rf
+
+THEMES=/usr/share/mythtv/themes
+
+chown -R root:root $THEMES
+chmod -R +r $THEMES
+find $THEMES -type f -print0 | xargs -0 chmod a-x
+
+
+chown -R mythtv:users /myth
+chown -R root:root /myth/backup/
+chown -R root:root /etc/sv
+
+chown -R http:users /data/srv/httpd/
+
+# None of thes files should be executable.
+for ext in gif png jpg xml htm html php ; do
+ find / -type f -name "*.$ext" -print0 | xargs -0 chmod a-x
+done
+
+# These files should be owned by root and not writable to anybody else
+
+#chown root:root /usr/share/mythtv/*.xml /usr/share/mythtv/*.ttf
+chown root:root /usr/share/mythtv/*.ttf
+
+chown -R root:root \
+ /usr/share/mythtv/i18n \
+ /usr/share/mythtv/mytharchive \
+ /usr/share/mythtv/mythflix \
+ /usr/share/mythtv/mythnews \
+ /usr/share/mythtv/mythvideo \
+ /usr/share/mythtv/mythweather \
+ /usr/LH
+
+
+
+# Report any remaining orphans...
+find / /myth -xdev \( -nouser -o -nogroup \) -ls