Subversion Repositories ALCASAR

Rev

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

Rev 3018 Rev 3043
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 3018 2022-06-04 16:54:31Z rexy $
2
# $Id: alcasar-conf.sh 3043 2022-07-22 17:10:23Z rexy $
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 190... Line 190...
190
		export PARENT_SCRIPT
190
		export PARENT_SCRIPT
191
		$DIR_BIN/alcasar-bl.sh -cat_choice
191
		$DIR_BIN/alcasar-bl.sh -cat_choice
192
		$DIR_BIN/alcasar-bl.sh -reload
192
		$DIR_BIN/alcasar-bl.sh -reload
193
# admin profile update (admin + manager + backup)
193
# admin profile update (admin + manager + backup)
194
		$DIR_BIN/alcasar-profil.sh --list
194
		$DIR_BIN/alcasar-profil.sh --list
195
# Start / Stop SSH Daemon
-
 
196
		ssh_active=`grep "^SSH=" $CONF_FILE|cut -d"=" -f2`
-
 
197
		if [ $ssh_active = "on" ]
-
 
198
		then
-
 
199
			/usr/bin/systemctl -q enable sshd.service
-
 
200
		else
-
 
201
			/usr/bin/systemctl -q disable sshd.service
-
 
202
		fi
-
 
203
# Apply changes between versions
195
# Apply changes between versions
204
##   V5.4 --> V5.5   ##
196
##   V5.4 --> V5.5   ##
205
		[ -e $DIR_ETC/alcasar-iptables-local.sh ] && cp $DIR_ETC/alcasar-iptables-local.sh $DIR_ETC/alcasar-iptables-local.sh.old && cp $CURRENT_DIR/conf/etc/alcasar-iptables-local.sh $DIR_ETC/   # new rule for SMTP output flows
197
		[ -e $DIR_ETC/alcasar-iptables-local.sh ] && cp $DIR_ETC/alcasar-iptables-local.sh $DIR_ETC/alcasar-iptables-local.sh.old && cp $CURRENT_DIR/conf/etc/alcasar-iptables-local.sh $DIR_ETC/   # new rule for SMTP output flows
206
# Remove the update folder
198
# Remove the update folder
207
		rm -rf $DIR_UPDATE
199
		rm -rf $DIR_UPDATE
Line 501... Line 493...
501
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", unbound-blacklist, unbound-whitelist, dnsmasq-whitelist, e2guardian, iptables"
493
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", unbound-blacklist, unbound-whitelist, dnsmasq-whitelist, e2guardian, iptables"
502
			/usr/bin/systemctl restart lighttpd && echo -n ", lighttpd"
494
			/usr/bin/systemctl restart lighttpd && echo -n ", lighttpd"
503
		fi
495
		fi
504
# Email user registration
496
# Email user registration
505
		$DIR_BIN/alcasar-mail-install.sh
497
		$DIR_BIN/alcasar-mail-install.sh
506
# Start / Stop SSH Daemon
-
 
507
		ssh_active=`grep ^SSH= $CONF_FILE|cut -d"=" -f2`
-
 
508
		if [ $ssh_active = "on" ]
-
 
509
		then
-
 
510
			/usr/bin/systemctl enable sshd.service
-
 
511
			if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
-
 
512
			then
-
 
513
				/usr/bin/systemctl start sshd.service
-
 
514
			fi
-
 
515
		else
-
 
516
			/usr/bin/systemctl disable sshd.service
-
 
517
			if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
-
 
518
			then
-
 
519
				/usr/bin/systemctl stop sshd.service
-
 
520
			fi
-
 
521
		fi
-
 
522
# Start / Stop LDAP authentification
498
# Start / Stop LDAP authentification
523
		if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
499
		if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
524
		then
500
		then
525
			LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2`
501
			LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2`
526
			if [ $LDAP_mode = "on" ]
502
			if [ $LDAP_mode = "on" ]