Subversion Repositories ALCASAR

Rev

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

Rev 2585 Rev 2600
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2585 2018-07-28 17:29:54Z tom.houdayer $
2
# $Id: alcasar-conf.sh 2600 2018-08-19 23:48:55Z tom.houdayer $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 156... Line 156...
156
			/usr/sbin/urpme --auto --auto-orphans
156
			/usr/sbin/urpme --auto --auto-orphans
157
			rm -rf /etc/httpd/ /var/log/httpd/ /var/dansguardian/ /etc/dansguardian/
157
			rm -rf /etc/httpd/ /var/log/httpd/ /var/dansguardian/ /etc/dansguardian/
158
	## lighttpd need a .pem certificate (aggregation with private key & server crt)
158
	## lighttpd need a .pem certificate (aggregation with private key & server crt)
159
			(cat $DIR_UPDATE/alcasar.key; echo; cat $DIR_UPDATE/alcasar.crt) > $DIR_UPDATE/alcasar.pem
159
			(cat $DIR_UPDATE/alcasar.key; echo; cat $DIR_UPDATE/alcasar.crt) > $DIR_UPDATE/alcasar.pem
160
		fi
160
		fi
-
 
161
## since v3.3.1:
-
 
162
	# add "SMS=off" in conf file
-
 
163
		if [ $(grep -c '^SMS=' $CONF_FILE) -eq 0 ]; then
-
 
164
			if [ $(grep -c '^\$service_SMS_status = true;' /var/www/html/autoregistrationinfo.php) -ne 0 ]; then
-
 
165
				echo "SMS=on" >> $CONF_FILE
-
 
166
			else
-
 
167
				echo "SMS=off" >> $CONF_FILE
-
 
168
			fi
-
 
169
		fi
-
 
170
		if [ $(grep -c '^SMS_NUM=' $CONF_FILE) -eq 0 ]; then
-
 
171
			num=$(grep "^\\\$current_num\s\?=\s\?'.\+';\$" /var/www/html/autoregistrationinfo.php | sed "s@^\\\$current_num\s\?=\s\?'\(.\+\)';\$@\1@")
-
 
172
			[ "$num" == 'XXXXXXXXXX' ] && num=''
-
 
173
			echo "SMS_NUM=$num" >> $CONF_FILE
-
 
174
		fi
161
######################   End of modifications between versions  #######################
175
######################   End of modifications between versions  #######################
162
# Retrieve the logo
176
# Retrieve the logo
163
		[ -e $DIR_UPDATE/organisme.png ] && cp -f $DIR_UPDATE/organisme.png $DIR_WEB/images/
177
		[ -e $DIR_UPDATE/organisme.png ] && cp -f $DIR_UPDATE/organisme.png $DIR_WEB/images/
164
		chown apache:apache $DIR_WEB/images/organisme.png $DIR_WEB/intercept.php
178
		chown apache:apache $DIR_WEB/images/organisme.png $DIR_WEB/intercept.php
165
# Retrieve the security certificates (CA and server)
179
# Retrieve the security certificates (CA and server)