Subversion Repositories ALCASAR

Rev

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

Rev 1379 Rev 1380
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1379 2014-06-11 07:40:34Z richard $ 
2
#  $Id: alcasar.sh 1380 2014-06-11 09:52:14Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 1460... Line 1460...
1460
42 0 1 * * root nice -n 19 run-parts --report /etc/cron.monthly
1460
42 0 1 * * root nice -n 19 run-parts --report /etc/cron.monthly
1461
EOF
1461
EOF
1462
	[ -e /etc/anacrontab.default ] || cp /etc/anacrontab /etc/anacrontab.default
1462
	[ -e /etc/anacrontab.default ] || cp /etc/anacrontab /etc/anacrontab.default
1463
	cat <<EOF >> /etc/anacrontab
1463
	cat <<EOF >> /etc/anacrontab
1464
7       8       cron.MysqlDump          nice /etc/cron.d/alcasar-mysql
1464
7       8       cron.MysqlDump          nice /etc/cron.d/alcasar-mysql
1465
7       10      cron.logExport          nice /etc/cron.d/alcasar-export_log
1465
7       10      cron.logExport          nice /etc/cron.d/alcasar-archive
1466
7       15      cron.logClean           nice /etc/cron.d/alcasar-clean_log
-
 
1467
7	20	cron.importClean	nice /etc/cron.d/alcasar-clean_import
1466
7	20	cron.importClean	nice /etc/cron.d/alcasar-clean_import
1468
EOF
1467
EOF
1469
 
1468
 
1470
	cat <<EOF > /etc/cron.d/alcasar-mysql
1469
	cat <<EOF > /etc/cron.d/alcasar-mysql
1471
# Contrôle, réparation et export de la base des usagers (tous les lundi à 4h45)
1470
# Contrôle, réparation et export de la base des usagers (tous les lundi à 4h45)
Line 1572... Line 1571...
1572
database = $DB_GAMMU
1571
database = $DB_GAMMU
1573
 
1572
 
1574
RunOnReceive = /usr/local/bin/alcasar-sms.sh --new_sms
1573
RunOnReceive = /usr/local/bin/alcasar-sms.sh --new_sms
1575
 
1574
 
1576
StatusFrequency = 30
1575
StatusFrequency = 30
1577
LoopSleep = 2
1576
;LoopSleep = 2
1578
 
1577
 
1579
;ResetFrequency = 300
1578
;ResetFrequency = 300
1580
;HardResetFrequency = 120
1579
;HardResetFrequency = 120
1581
 
1580
 
1582
CheckSecurity = 1 
1581
CheckSecurity = 1 
Line 1592... Line 1591...
1592
 
1591
 
1593
#Edition du script sql gammu <-> radius
1592
#Edition du script sql gammu <-> radius
1594
$SED "10c u_db=\"$DB_USER\"" $DIR_DEST_BIN/alcasar-sms.sh
1593
$SED "10c u_db=\"$DB_USER\"" $DIR_DEST_BIN/alcasar-sms.sh
1595
$SED "11c p_db=\"$radiuspwd\"" $DIR_DEST_BIN/alcasar-sms.sh
1594
$SED "11c p_db=\"$radiuspwd\"" $DIR_DEST_BIN/alcasar-sms.sh
1596
 
1595
 
-
 
1596
#Création de la règle udev pour les Huawei // idVendor: 12d1
-
 
1597
cat << EOF > /etc/udev/rules.d/66-huawei.rules
-
 
1598
KERNEL=="ttyUSB0",ATTRS{idVendor}=="12d1",RUN+="/usr/local/bin/alcasar-sms.sh --mode"
-
 
1599
EOF
-
 
1600
 
1597
} # END gammu_smsd()
1601
} # END gammu_smsd()
1598
 
1602
 
1599
##################################################################
1603
##################################################################
1600
##			Fonction "post_install"			##
1604
##			Fonction "post_install"			##
1601
## - Modification des bannières (locales et ssh) et des prompts ##
1605
## - Modification des bannières (locales et ssh) et des prompts ##