@@ -23,10 +23,10 @@ utilisée par les abeilles comme mortier et anti-infectieux pour assainir la ruc
23
23
24
24
* Tous les mots de passe seront : ${RED} \e[4m${dummy_pwd}${NC} \e[24m (à changer après l'execution de ce script)
25
25
26
- * Ce script a besoin d'être executé en temps que root ${RED} \e[4mSUR${NC} \e[24m la brique à partir d'une image
26
+ * Ce script a besoin d'être executé en temps que root ${RED} \e[4mSUR${NC} \e[24m la brique à partir d'une image
27
27
labriqueinternet_04-06-2015_jessie.img installée sur la carte SD
28
-
29
- * Si vous rencontrez des problèmes, référez-vous à la documentation originale :
28
+
29
+ * Si vous rencontrez des problèmes, référez-vous à la documentation originale :
30
30
https://yunohost.org/installation_brique_fr${LGREEN}
31
31
_____________________________________________________________________________________________
32
32
\n\n${LBLUE} "
@@ -131,15 +131,15 @@ get_variables() {
131
131
read install_pirate
132
132
echo
133
133
fi
134
- if [ " ${install_pirate} " = " oui" ]; then
134
+ if [ " ${install_pirate} " = " oui" ]; then
135
135
echo -e " ${RED} [Optionnel] ${LGREEN} Nom du SSID de votre hotspot pour la PirateBox\n${GRAY} Defaut: ShareBox${NC} "
136
136
read pirate_ssid
137
137
if [ -z " ${pirate_ssid} " ]; then
138
138
pirate_ssid=" ShareBox"
139
139
fi
140
140
echo
141
141
echo -e " ${RED} [Optionnel] ${LGREEN} Choisir un nom pour la PirateBox\n${GRAY} Defaut: PirateBox${NC} "
142
- read pirate_name
142
+ read pirate_name
143
143
if [ -z " ${pirate_name} " ]; then
144
144
pirate_name=" PirateBox"
145
145
fi
@@ -253,7 +253,7 @@ create_yunohost_user() {
253
253
echo -e " =========================================== "
254
254
echo -e " Création du premier utilisateur YunoHost..."
255
255
echo -e " =========================================== ${NC} \n"
256
-
256
+
257
257
if [ -n " $( yunohost user list | grep username) " ]; then
258
258
echo -e " ${LGREEN} "
259
259
echo -e " ## Il y a déjà un utilisateur principal, passage à la suite... ##\n"
@@ -289,7 +289,7 @@ configure_vpnclient() {
289
289
290
290
# Restrict user access to the app
291
291
yunohost app addaccess vpnclient -u $username
292
-
292
+
293
293
# Rézine related: add some VPN configuration directives
294
294
wget http://www.rezine.org/files/config-VPN-propolis.txt -q -O - > /etc/openvpn/client.conf.tpl
295
295
@@ -310,13 +310,13 @@ configure_vpnclient() {
310
310
yunohost app setting vpnclient server_port -v " 1194"
311
311
yunohost app setting vpnclient server_proto -v " udp"
312
312
yunohost app setting vpnclient service_enabled -v " 1"
313
-
313
+
314
314
yunohost app setting vpnclient login_user -v " $vpn_username "
315
315
yunohost app setting vpnclient login_passphrase -v " $vpn_pwd "
316
-
316
+
317
317
# Add the service to YunoHost's monitored services
318
318
yunohost service add ynh-vpnclient -l /var/log/openvpn-client.log
319
-
319
+
320
320
echo -e " ${LGREEN} "
321
321
echo -e " ===================== "
322
322
echo -e " Restarting OpenVPN..."
@@ -509,7 +509,7 @@ fix_yunohost_services() {
509
509
|| echo " nslcd already listed in services"
510
510
yunohost service add spamassassin -l /var/log/mail.log \
511
511
|| echo " spamassassin already listed in services"
512
-
512
+
513
513
yunohost service remove bind9 || echo " Bind9 already removed"
514
514
515
515
echo -e " ${LBLUE} \e[1m ----> Fait ! \e[21m${NC} "
@@ -537,7 +537,7 @@ add_vpn_restart_cron() {
537
537
echo -e " Ajout d'une tâche cron pour s'assurer que le tunnel chiffré fonctionne..."
538
538
echo -e " ========================================================================= ${NC} \n"
539
539
540
- echo " * * * * * root /sbin/ifconfig tun0 > /dev/null 2>&1 || systemctl restart ynh-vpnclient" > /etc/cron.d/restart-vpn
540
+ echo " * * * * * root /bin/ip a s tun0 > /dev/null 2>&1 || systemctl restart ynh-vpnclient" > /etc/cron.d/restart-vpn
541
541
echo -e " ${LBLUE} \e[1m ----> Fait ! \e[21m${NC} "
542
542
}
543
543
@@ -557,9 +557,8 @@ configure_DKIM() {
557
557
}
558
558
559
559
display_win_message () {
560
- ip6=$( ifconfig | grep -C4 tun0 | awk ' /inet6 addr/{print $3}' | sed ' s/\/64//' || echo ' ERROR' )
561
- # ip4=$(ifconfig | grep -C4 tun0 | awk '/inet addr/{print substr($2,6)}' || echo 'ERROR')
562
- ip4=$( ifconfig tun0 | grep ' inet adr:' | cut -d: -f2 | awk ' { print $1}' || echo ' ERROR' )
560
+ ip6=$( ip -6 addr show tun0 | awk -F' [/ ]' ' /inet/{print $6}' || echo ' ERROR' )
561
+ ip4=$( ip -4 addr show tun0 | awk -F' [/ ]' ' /inet/{print $6}' || echo ' ERROR' )
563
562
564
563
wget http://www.rezine.org/files/footer-install-propolis.txt -q -O -
565
564
@@ -578,7 +577,7 @@ _xmpp-server._tcp 14400 IN SRV 0 5 5269 $domain.
578
577
@ 14400 IN TXT " v=spf1 a mx ip4:$ip4 -all" "
579
578
$( cat /etc/opendkim/keys/$domain /mail.txt > /dev/null 2>&1 || echo ' ' )
580
579
echo -e " ${LGREEN} __________________________________________________________________________${GRAY}
581
- (Pour d'avantage d'information sur la configuration des DNS, visitez
580
+ (Pour d'avantage d'information sur la configuration des DNS, visitez
582
581
cette page : ${LBLUE} http://www.rezine.org/documentation/propolis${GRAY} )"
583
582
584
583
if [ ! -z " $additional_domain " ]; then
@@ -588,7 +587,7 @@ cette page : ${LBLUE}http://www.rezine.org/documentation/propolis${GRAY})"
588
587
echo -e "
589
588
\n${LGREEN} --> Et n'oubliez pas de changer :
590
589
__________________________________________________________________________${NC}
591
-
590
+
592
591
* Le mot de passe d'administration via l'interface Web de la Propolis :
593
592
${LBLUE} http://${domain} /yunohost/admin/#/tools/adminpw${NC}
594
593
@@ -597,7 +596,7 @@ __________________________________________________________________________${NC}
597
596
598
597
* Le(s) mot(s) de passe Wifi (WPA2) via l'interface Web de la Propolis :
599
598
${LBLUE} http://${domain} /wifiadmin${NC}
600
-
599
+
601
600
* Et si vous ne l'avez pas fait, le mot de passe root avec la commande :
602
601
${RED} passwd${LGREEN}
603
602
__________________________________________________________________________${NC} "
0 commit comments