Add whitelist of users to not disable (ex. ctdalek)
authorZachary Seguin <ztseguin@csclub.uwaterloo.ca>
Sun, 21 Feb 2016 05:28:20 +0000 (00:28 -0500)
committerZachary Seguin <ztseguin@csclub.uwaterloo.ca>
Sun, 21 Feb 2016 05:28:20 +0000 (00:28 -0500)
generate-expire-config

index c590be2..86c807a 100755 (executable)
@@ -4,7 +4,7 @@
 # CONFIGURATION
 #
 DISABLED_PAGE=/~sysadmin/expired/index.php
-
+WHITELIST="ctdalek"
 #
 # Temporary files
 #
@@ -50,7 +50,7 @@ ldapsearch -xb "ou=People,dc=csclub,dc=uwaterloo,dc=ca" "(&${TERM_FILTER}(object
 # Generate Apache config
 #
 for uid in $(cat ${EXPIRED_USERS}); do
-   if [ -d /users/${uid}/www ]; then
+   if [ -d /users/${uid}/www ] && [[ ! ${WHITELIST} =~ ${uid} ]]; then
       echo "<Directory /users/${uid}>"
       echo "    AllowOverride None"
       echo "    RewriteEngine On"