Subversion Repositories ALCASAR

Rev

Rev 2454 | Rev 2502 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2454 Rev 2501
Line 154... Line 154...
154
done
154
done
155
echo "</font>" >> $TMP_HTML
155
echo "</font>" >> $TMP_HTML
156
echo "</body>" >> $TMP_HTML
156
echo "</body>" >> $TMP_HTML
157
echo "</HTML>" >> $TMP_HTML
157
echo "</HTML>" >> $TMP_HTML
158
 
158
 
159
#inform users about that by setting the fourth bit of Filter-Id at 1.
159
# inform users about that by setting the Alcasar-Imputability-Warning attribute
160
QUERY="SELECT username from radreply INTO OUTFILE '$TMP_USERS' FIELDS TERMINATED BY ',' ENCLOSED BY '' LINES TERMINATED BY '\n';"
160
QUERY="INSERT INTO radreply (username, attribute, value, op) SELECT ui.username, 'Alcasar-Imputability-Warning', '1' , ':=' FROM userinfo ui LEFT JOIN radreply rr ON rr.username = ui.username AND rr.attribute = 'Alcasar-Imputability-Warning' WHERE rr.username IS NULL;"
161
mysql -u root -p"$DB_ROOT_PW" -D radius -e "$QUERY"
161
mysql -u root -p"$DB_ROOT_PW" -D radius -e "$QUERY"
162
 
162
 
163
if [ -e $TMP_USERS ] && [ $(cat $TMP_USERS | wc -l) -gt 0 ]
-
 
164
then
-
 
165
	for user in $(cat $TMP_USERS)
-
 
166
	do
-
 
167
		QUERY="set @CurrentFilter=(SELECT value from radreply where username='$user');set @CurrentFilterLeft=(SELECT LEFT(@CurrentFilter,3));set @CurrentFilterRight=(SELECT RIGHT(@CurrentFilter,4));UPDATE radreply SET value = CONCAT((@CurrentFilterLeft),'1', (@CurrentFilterRight)) WHERE username='$user' ;"
-
 
168
		mysql -u root -p"$DB_ROOT_PW" -D radius -e "$QUERY"
-
 
169
	done
-
 
170
fi	
-
 
171
rm $TMP_USERS
-
 
172
 
-
 
173
 
-
 
174
/usr/bin/wkhtmltopdf $TMP_HTML $TMP_PDF
163
/usr/bin/wkhtmltopdf $TMP_HTML $TMP_PDF
175
 
164
 
176
 
165
 
177
/usr/bin/7za a -tzip -p$1 -mem=AES256 $ARCHIVE_LOCATION $TMP_PDF
166
/usr/bin/7za a -tzip -p$1 -mem=AES256 $ARCHIVE_LOCATION $TMP_PDF
178
chown apache:apache $ARCHIVE_LOCATION
167
chown apache:apache $ARCHIVE_LOCATION