Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SME SERVER POSTINSTALL
echo "#------------------------------------------------------------------------------#";
echo " /COMMON/ directory (Set up in the Primary IBay)";
echo "#------------------------------------------------------------------------------#";
#
# AQUILAE "/common/" folder (THIS MAY CHANGE LOCATION)
#
if [ ! -f /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90e-smithAccess15common ]; then
echo "COMMON's access file not found!"
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cat << EOF > /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90e-smithAccess15common
#------------------------------------------------------------
# AQUILAE /common/ directory
#------------------------------------------------------------
Alias /common/ /home/e-smith/files/ibays/Primary/common/
<Directory /home/e-smith/files/ibays/Primary/common>
AddType application/x-httpd-php .php .asp .aspx .htm .html
php_flag display_errors off
AddDefaultCharset UTF-8
Options None
Options +Indexes
Options +Includes
AllowOverride All
order deny,allow
deny from all
allow from all
</Directory>
EOF
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtuaHosts
cat << EOF > /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtuaHosts/39commonAlias
# alias for AQUILAE 'common'
Alias /common/ /home/e-smith/files/ibays/Primary/common/
EOF
fi
if [ ! -d /home/e-smith/files/ibays/Primary/common ]; then
echo "COMMON's directory not found! Generating directory structures..."
mkdir -p /home/e-smith/files/ibays/Primary/common/images
mkdir -p /home/e-smith/files/ibays/Primary/common/css
mkdir -p /home/e-smith/files/ibays/Primary/common/js
mkdir -p /home/e-smith/files/ibays/Primary/common/xml
mkdir -p /home/e-smith/files/ibays/Primary/common/video
mkdir -p /home/e-smith/files/ibays/Primary/common/_PUBLIC
mkdir -p /home/e-smith/files/ibays/Primary/common/_ARCHIVE
mkdir -p /home/e-smith/files/ibays/Primary/common/_INCOMING
mkdir -p /home/e-smith/files/ibays/Primary/common/_OUTGOING
mkdir -p /home/e-smith/files/ibays/Primary/common/fonts
mkdir -p /home/e-smith/files/ibays/Primary/common/sh
mkdir -p /home/e-smith/files/ibays/Primary/common/audio
mkdir -p /home/e-smith/files/ibays/Primary/common/swf
cd /home/e-smith/files/ibays/Primary
chown admin:shared /home/e-smith/files/ibays/Primary/common/*.* -R
chown admin:shared /home/e-smith/files/ibays/Primary/common
chmod 0777 /home/e-smith/files/ibays/Primary/common
chmod 0777 /home/e-smith/files/ibays/Primary/common/*.* -R
fi
sleep 3
clear
dialog --title 'REMOTE CONTENT FROM GITHUB' --msgbox 'If you are reading this, then a GIST was successfully included in your generated postinstall script.\n\nThis portion depolyed the ROGUE SUPPORT COMMON FRAMEWORK. All websites should have a /common/ directory now.' 30 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.