commit a68f1420769b12f4bcf07acb716df4ed7a990387 Author: Zachary Seguin Date: Sat Dec 5 00:57:45 2015 -0500 Initial commit diff --git a/disable-webspace b/disable-webspace new file mode 100755 index 0000000..1a69b74 --- /dev/null +++ b/disable-webspace @@ -0,0 +1,61 @@ +#!/bin/bash + +# +# CONFIGURATION +# +DISABLED_PAGE=/~sysadmin/expired/index.php + +# +# Temporary files +# +EXPIRED_USERS=`mktemp "/tmp/expired_users.XXXX"` + +# +# Identify expired accounts +# + +# Get the current term +YEAR=$(date '+%Y') +MONTH=$(date '+%m') +TERM_START_MONTH=$(($MONTH - (($MONTH - 1) % 4))) + +# NOTE: This is configured to give 1 months grace period +if [ ${TERM_START_MONTH} -eq 1 ]; then + if [ ${MONTH} = 1 ]; then + TERM_FILTER="(!(term=F$((${YEAR} - 1))))(!(term=W${YEAR}))" + else + TERM_FILTER="(!(term=W${YEAR}))" + fi +elif [ ${TERM_START_MONTH} -eq 5 ]; then + if [ ${MONTH} = 5 ]; then + TERM_FILTER="(!(term=W${YEAR}))(!(term=W${YEAR}))" + else + TERM_FILTER="(!(term=S${YEAR}))" + fi +elif [ ${TERM_START_MONTH} -eq 9 ]; then + if [ ${MONTH} = 9 ]; then + TERM_FILTER="(!(term=S${YEAR}))(!(term=F${YEAR}))" + else + TERM_FILTER="(!(term=F${YEAR}))" + fi +else + echo "Invalid term start month: ${TERM_START_MONTH}" >&2 + exit 1 +fi + +# Find expired accounts +ldapsearch -xb "ou=People,dc=csclub,dc=uwaterloo,dc=ca" "(&${TERM_FILTER}(objectClass=member))" | grep 'uid:' | awk '{print $2}' | sort -u > ${EXPIRED_USERS} + +# +# Generate Apache config +# +for uid in $(cat ${EXPIRED_USERS}); do + echo "" + echo " AllowOverride None" + echo " RewriteEngine On" + echo " RewriteRule . ${DISABLED_PAGE} [L]" + echo "" + echo "" +done + +rm -f ${EXPIRED_USERS} diff --git a/www/css/disabled.css b/www/css/disabled.css new file mode 100644 index 0000000..6090464 --- /dev/null +++ b/www/css/disabled.css @@ -0,0 +1,70 @@ +html { + font-family: sans-serif; + background: #eee; +} + +a img { + border: none; +} + +header { + margin: 0 auto; + max-width: 500px; +} + +.wrapper { + max-width: 750px; + background: white; + padding: 30px; + margin: 30px auto; + border-radius: 5px; + box-shadow: 1px 1px 6px rgba(0, 0, 0, .5); +} + +.logos .logo { + display: block; + width: 100%; + max-width: 250px; + margin: 0 auto; + overflow: hidden; +} + +@media (min-width: 800px) { + .logos .logo { + max-width: 350px; + } +} + +.logos .logo img { + width: 100%; +} + + + +.body { + clear: both; + max-width: 500px; + margin: 0 auto; +} + +.body h1 { + border-top: 1px solid black; + border-bottom: 1px solid black; + text-align: center; + padding: 20px 0; + text-transform: uppercase; +} + +.body p { + padding: 5px 15px; + line-height: 1.5em; +} + +ul { + list-style: square; + line-height: 1.5em; +} + +ul li { + margin-bottom: 10px; +} diff --git a/www/img/csc.png b/www/img/csc.png new file mode 100644 index 0000000..cb31d99 Binary files /dev/null and b/www/img/csc.png differ diff --git a/www/img/disabled.png b/www/img/disabled.png new file mode 100644 index 0000000..8254928 Binary files /dev/null and b/www/img/disabled.png differ diff --git a/www/img/uwaterloo.png b/www/img/uwaterloo.png new file mode 100644 index 0000000..f518188 Binary files /dev/null and b/www/img/uwaterloo.png differ diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..1e7173f --- /dev/null +++ b/www/index.php @@ -0,0 +1,42 @@ + + + + + + + + + + Computer Science Club of the University of Waterloo + + + + +
+
+
+ + +
+
+
+

Parked Website

+

This is a parking page for the website of a previous Computer Science Club member.

+ +

If you are the owner and would like to continue using our web hosting, please renew your membership to restore access to your website.

+ +

We apologize for any inconvenience this may cause. If you have any questions, please contact syscom@csclub.uwaterloo.ca.

+
+
+ +