/scripts/alcasar-conf.sh |
---|
148,9 → 148,9 |
ssh_active=`grep SSH= $CONF_FILE|cut -d"=" -f2` |
if [ $ssh_active = "on" ] |
then |
systemctl -q enable sshd.service |
/usr/bin/systemctl -q enable sshd.service |
else |
systemctl -q disable sshd.service |
/usr/bin/systemctl -q disable sshd.service |
fi |
# Remove the update folder |
rm -rf $DIR_UPDATE |
216,7 → 216,7 |
echo -n "Stop services : " |
for i in ntpd httpd tinyproxy dnsmasq dnsmasq-whitelist dnsmasq-blacklist chilli network |
do |
systemctl stop $i && echo -n "$i, " |
/usr/bin/systemctl stop $i && echo -n "$i, " |
done |
echo |
fi |
282,12 → 282,12 |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage |
then |
# Services start |
systemctl start network && echo -n "Start service : network" && sleep 1 |
/usr/bin/systemctl start network && echo -n "Start service : network" && sleep 1 |
$DIR_SBIN/alcasar-dhcp.sh -$DHCP_mode && echo -n ", coova" # apply DHCP mode and start coova |
for i in dnsmasq httpd tinyproxy ntpd |
do |
sleep 1 |
systemctl start $i && echo -n ", $i" |
/usr/bin/systemctl start $i && echo -n ", $i" |
done |
$DIR_SBIN/alcasar-bl.sh -reload && echo ", dnsmasq-blacklist, dnsmasq-whitelist, iptables" |
fi |
295,16 → 295,16 |
ssh_active=`grep SSH= $CONF_FILE|cut -d"=" -f2` |
if [ $ssh_active = "on" ] |
then |
/bin/systemctl enable sshd.service |
/usr/bin/systemctl enable sshd.service |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage |
then |
/bin/systemctl start sshd.service |
/usr/bin/systemctl start sshd.service |
fi |
else |
/bin/systemctl disable sshd.service |
/usr/bin/systemctl disable sshd.service |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage |
then |
/bin/systemctl stop sshd.service |
/usr/bin/systemctl stop sshd.service |
fi |
fi |
;; |
/scripts/alcasar-daemon.sh |
---|
13,11 → 13,11 |
SERVICES="mysqld httpd ntpd iptables dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole radiusd nfsen dansguardian freshclam ulogd-ssh ulogd-traceability ulogd-ext-access chilli fail2ban sshd" |
function ServiceTest () { |
CMD=`systemctl is-active $s` |
CMD=`/usr/bin/systemctl is-active $s` |
if [ $CMD != "active" ] |
then |
logger -i "!! $s is inactive. Activation attempt" |
systemctl start $s.service |
/usr/bin/systemctl start $s.service |
fi |
} |
/scripts/sbin/alcasar-bl.sh |
---|
225,8 → 225,8 |
cp -f $DIR_DG_BL/ossi/domains $DIR_DNS_BL/ossi.conf |
$SED "s?.*?address=/&/$PRIVATE_IP?g" $DIR_DNS_BL/ossi.conf |
cp -f $DIR_DG_BL/ossi/domains_wl $DIR_DNS_WL/ossi.conf |
systemctl restart dnsmasq-blacklist |
systemctl restart dnsmasq-whitelist |
/usr/bin/systemctl restart dnsmasq-blacklist |
/usr/bin/systemctl restart dnsmasq-whitelist |
/usr/local/bin/alcasar-iptables.sh |
;; |
*) |
/scripts/sbin/alcasar-bypass.sh |
---|
43,7 → 43,7 |
$SED "s?^#no-dhcp-interface=$INTIF?no-dhcp-interface=$INTIF?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=tun0?no-dhcp-interface=tun0?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=lo?no-dhcp-interface=lo?g" /etc/dnsmasq.conf |
systemctl restart dnsmasq |
/usr/bin/systemctl restart dnsmasq |
/usr/bin/systemctl start chilli |
sh /usr/local/bin/alcasar-iptables.sh |
# activation of the "daemon-watchdog" every 18' |
/scripts/sbin/alcasar-uninstall.sh |
---|
21,7 → 21,7 |
for i in alcasar-load_balancing freshclam ntpd dansguardian httpd radiusd mysqld dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy havp nfsen chilli fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability vnstat |
do |
[ -e /lib/systemd/system/$i.service ] && systemctl disable $i.service && systemctl stop $i.service 1>/dev/null |
[ -e /lib/systemd/system/$i.service ] && /usr/bin/systemctl disable $i.service && /usr/bin/systemctl stop $i.service 1>/dev/null |
done |
echo "Reset ALCASAR main functions : " |
61,7 → 61,7 |
echo -en "\n- init_db(2) : " |
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, " |
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2" |
systemctl daemon-reload |
/usr/bin/systemctl daemon-reload |
rm -rf /var/lib/mysql |
sleep 1 |