Fix template for config.sh
This commit is contained in:
parent
bba47844b9
commit
2e79716945
17
config.sh
17
config.sh
|
@ -6,10 +6,12 @@
|
|||
################################################################################
|
||||
now=$(date +%Y-%m-%d)
|
||||
|
||||
echo "Ce script configure votre noeud G1sms+ (effacez ./shell/init.sh avant de le lancer)"
|
||||
echo "Ce script configure votre noeud G1sms+"
|
||||
IPFS=$(ps auxf --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1);
|
||||
|
||||
if [[ -f ./shell/init.sh.template && ! -f ./shell/init.sh ]]; then
|
||||
cp .install/init.sh.template ./shell/init.sh
|
||||
|
||||
if [[ -f .install/init.sh.template ]]; then
|
||||
echo "Quel est l'utilisateur du système IPFS (détecté: $IPFS)?"
|
||||
read YOU
|
||||
if [[ "$YOU" == "" ]]; then YOU=$IPFS; fi
|
||||
|
@ -29,16 +31,17 @@ if [[ -f ./shell/init.sh.template && ! -f ./shell/init.sh ]]; then
|
|||
echo "L'adresse où se trouve votre G1Node pour indiquer où venir chercher ses G1Tag (ex: au G1FabLab de Toulouse)"
|
||||
read ADRESSE
|
||||
|
||||
echo "LES PARAMETRES SONT BONS? Appliquer? ENTER ou CTRL-C ?"
|
||||
read
|
||||
|
||||
[[ -f ./shell/init.sh ]] && mv ./shell/init.sh ./shell/init.sh.old
|
||||
|
||||
sed -i s/pi/$YOU/g ./shell/init.sh.template
|
||||
sed -i s/+33600000000/$MASTERPHONE/g ./shell/init.sh.template
|
||||
sed -i s/au\ G1FabLab\ de\ Toulouse/$ADRESSE/g ./shell/init.sh.template
|
||||
sed -i s/+33647683646/$ADMINPHONE/g ./shell/init.sh.template
|
||||
sed -i s/Fred/$ADMINPSEUDO/g ./shell/init.sh.template
|
||||
|
||||
cat ./shell/init.sh.template
|
||||
cat ./shell/init.sh
|
||||
|
||||
echo "LES PARAMETRES SONT BONS? Appliquer? ENTER ou CTRL-C ?"
|
||||
read
|
||||
cp ./shell/init.sh.template ./shell/init.sh
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue