Adapat install kallkun for gammu 1.37 on stretch
This commit is contained in:
parent
bd5efb3a67
commit
123b4ea563
|
@ -9,9 +9,13 @@ unset err
|
|||
args=$@
|
||||
[[ $args =~ noask ]] && noask=o && askSSL=o
|
||||
|
||||
OS=$(head -n1 $MY_PATH/.OS)
|
||||
IP=$(ifconfig | grep "inet " | grep -v "127.0.0.1" | awk '{ print $2 }')
|
||||
[[ ! $KSMS_DOMAIN ]] && echo -e "${c_yellow}Choisissez un nom de domaine pour KALKUN (Sinon $IP sera choisi): $c_" && read KSMS_DOMAIN
|
||||
[[ ! $KSMS_DOMAIN ]] && KSMS_DOMAIN=$IP && askSSL=n && noask=o
|
||||
if [[ -z $KSMS_DOMAIN ]]; then
|
||||
echo -e "${c_yellow}Choisissez un nom de domaine pour KALKUN (Sinon $IP sera choisi): $c_" && read KSMS_DOMAIN
|
||||
[[ -z $KSMS_DOMAIN ]] && KSMS_DOMAIN=$IP && askSSL=n && noask=o
|
||||
sed -i "s/\<KSMS_DOMAIN=/&$KSMS_DOMAIN/" $MY_PATH/../.profile
|
||||
fi
|
||||
|
||||
DOMAIN=$KSMS_DOMAIN
|
||||
|
||||
|
@ -34,7 +38,11 @@ if [[ ! $(sudo mysql -e "show databases;" | grep gammu) ]]; then
|
|||
fi
|
||||
if [[ -z $(sudo mysql gammu -e "SHOW TABLES LIKE 'outbox';") ]]; then
|
||||
echo -e "${c_yellow}Importation du dump gammu...$c_"
|
||||
sudo mysql gammu < $MY_PATH/templates/4a/mysql.sql || err+="Import dump MySQL"
|
||||
if [[ $OS == "buster" ]]; then
|
||||
sudo mysql gammu < $MY_PATH/templates/4a/mysql.sql || err+="Import dump MySQL"
|
||||
elif [[ $OS == "stretch" ]]; then
|
||||
sudo mysql gammu < $MY_PATH/templates/4a/mysql-stretch.sql || err+="Import dump MySQL"
|
||||
fi
|
||||
fi
|
||||
if [[ -z $(sudo mysql gammu -e "SHOW TABLES LIKE 'kalkun';") ]]; then
|
||||
echo -e "${c_yellow}Importation du dump kalkun...$c_"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
ADMINPSEUDO=
|
||||
ADMINPHONE=
|
||||
MASTERPHONE=
|
||||
ADRESSE=
|
||||
PSMS_DOMAIN=
|
||||
ADMINPSEUDO=_ADMINPSEUDO
|
||||
ADMINPHONE=_ADMINPHONE
|
||||
MASTERPHONE=_MASTERPHONE
|
||||
ADRESSE="_ADRESSE"
|
||||
KSMS_DOMAIN=
|
||||
|
|
|
@ -30,7 +30,7 @@ export G1SMS="YES"
|
|||
fi
|
||||
|
||||
|
||||
export YOU=$(ps aux --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1)
|
||||
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
export CHEMIN="/home/$YOU/G1sms+"
|
||||
cd $CHEMIN
|
||||
##################################################################
|
||||
|
@ -61,13 +61,13 @@ fi
|
|||
export NODECOMM=10
|
||||
##################################################################
|
||||
# SMS SIM Card Phone Number
|
||||
export MASTERPHONE="+33600000000"
|
||||
export ADRESSE="au G1FabLab de Toulouse"
|
||||
export MASTERPHONE="_MASTERPHONE"
|
||||
export ADRESSE="_ADRESSE"
|
||||
export G1DAB="NO"
|
||||
##################################################################
|
||||
# ADMIN COMMAND PHONE ORIGIN
|
||||
export ADMINPHONE="+33647683646"
|
||||
export ADMINPSEUDO="Fred"
|
||||
export ADMINPHONE="_ADMINPHONE"
|
||||
export ADMINPSEUDO="_ADMINPSEUDO"
|
||||
##################################################################
|
||||
# DUNITER/CESIUM+ DEFAULT SERVERS
|
||||
export DUNITER="https://g1.duniter.org"
|
||||
|
|
21
install.sh
21
install.sh
|
@ -53,7 +53,6 @@ else
|
|||
fi
|
||||
|
||||
echo -e "${c_yellow}Ce script va désormais configurer votre noeud G1sms+$c_"
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
|
||||
if [[ -f $MY_PATH/.install/templates/init.sh ]]; then
|
||||
[[ ! $ADMINPSEUDO ]] && echo -e "${c_light}Votre PSEUDO? (celui de votre Compte membre Duniter)$c_" && read ADMINPSEUDO
|
||||
|
@ -68,16 +67,24 @@ if [[ -f $MY_PATH/.install/templates/init.sh ]]; then
|
|||
[[ ! $ADRESSE ]] && echo -e "${c_light}L'adresse où se trouve votre G1Node pour indiquer où venir chercher ses G1Tag (ex: au G1FabLab de Toulouse)$c_" && read ADRESSE
|
||||
|
||||
echo -e "ADMINPSEUDO: $ADMINPSEUDO\nADMINPHONE: $ADMINPHONE\nMASTERPHONE: $MASTERPHONE\nADRESSE: $ADRESSE"
|
||||
[[ $noask != "o" ]] && echo -e "${c_light}${c_blue}LES PARAMETRES SONT BONS? Appliquer? ENTER ou CTRL-C ?$c_" && read
|
||||
[[ $noask != "o" ]] && echo -e "${c_light}${c_blue}LES PARAMETRES SONT BONS? Appliquer? ENTER ou CTRL-C ? (Editez le fichier .profile si incorrect)$c_" && read
|
||||
|
||||
[[ -f shell/init.sh ]] && mv shell/init.sh shell/init.sh.old
|
||||
cp $MY_PATH/.install/templates/init.sh shell/init.sh || err+=1
|
||||
|
||||
sed -i s/pi/$YOU/g $init_loc
|
||||
sed -i s/+33600000000/$MASTERPHONE/g $init_loc
|
||||
sed -i s/au\ G1FabLab\ de\ Toulouse/$ADRESSE/g $init_loc
|
||||
sed -i s/+33647683646/$ADMINPHONE/g $init_loc
|
||||
sed -i s/Fred/$ADMINPSEUDO/g $init_loc
|
||||
sed -i s/_MASTERPHONE/$MASTERPHONE/g $init_loc
|
||||
sed -i s/_ADRESSE/$ADRESSE/g $init_loc
|
||||
sed -i s/_ADMINPHONE/$ADMINPHONE/g $init_loc
|
||||
sed -i s/_ADMINPSEUDO/$ADMINPSEUDO/g $init_loc
|
||||
|
||||
if [[ ! -f $MY_PATH/.profile ]]; then
|
||||
cp $MY_PATH/.install/templates/.profile $MY_PATH/
|
||||
sed -i s/_MASTERPHONE/$MASTERPHONE/g $MY_PATH/.profile
|
||||
sed -i s/_ADRESSE/$ADRESSE/g $MY_PATH/.profile
|
||||
sed -i s/_ADMINPHONE/$ADMINPHONE/g $MY_PATH/.profile
|
||||
sed -i s/_ADMINPSEUDO/$ADMINPSEUDO/g $MY_PATH/.profile
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e "${c_red}init.sh introuvable...$c_"
|
||||
err+=1
|
||||
|
|
Loading…
Reference in New Issue