Renaming package to ShadowArch to follow /wiki/Design_Principles; improved packing; development sync to current state -- massive overhaul
This commit is contained in:
42
AdminScripts/silent-guardian
Executable file
42
AdminScripts/silent-guardian
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
DEPRIV=depriv
|
||||
if [ ! -f /usr/local/src/SharedLibraries/Bash/header ]; then
|
||||
echo This script requires the SharedLibraries package.
|
||||
exit 1;
|
||||
fi
|
||||
source /usr/local/src/SharedLibraries/Bash/header
|
||||
export logfile="/var/log/silent-guardian.log"
|
||||
|
||||
logstatement "Started $(date)"
|
||||
|
||||
# Fix the Webserver permissions
|
||||
if [ -f /srv/http ]; then
|
||||
chown -R $DEPRIV:http /srv/http/*
|
||||
find /srv/http/* -type f -exec chmod 0640 {} \;
|
||||
find /srv/http/* -type d -exec chmod 0750 {} \;
|
||||
fi;
|
||||
|
||||
# Fix the media permissions
|
||||
/usr/local/bin/yggdrasil-lock
|
||||
|
||||
# fix the WolfPack results location
|
||||
if [ -x /usr/local/bin/wolfpack ]; then
|
||||
find /srv/wolfpack -type d -exec chmod 0755 {} \;
|
||||
find /srv/wolfpack -type f -exec chmod 0644 {} \;
|
||||
fi
|
||||
|
||||
# Guard root
|
||||
chmod 0700 /root
|
||||
chown -R root:root /root
|
||||
find /root -type d -exec chmod 0700 {} \;
|
||||
|
||||
# Guard home directories
|
||||
chmod 0750 /home/*
|
||||
|
||||
# Guard LDAP
|
||||
if [ -d /etc/openldap ]; then
|
||||
chown ldap:ldap /var/lib/openldap/openldap-data/*
|
||||
fi
|
||||
|
||||
logstatement "Ended $(date)"
|
||||
logstatement " "
|
Reference in New Issue
Block a user