|
|
|
|
639
|
cp $rootdir/root/$PROJECT_NAME/img/icon_ferment.png $rootdir/etc/patchwork/icon_ferment.png
|
639
|
cp $rootdir/root/$PROJECT_NAME/img/icon_ferment.png $rootdir/etc/patchwork/icon_ferment.png
|
640
|
}
|
640
|
}
|
641
|
|
641
|
|
|
|
642
|
+mesh_shutdown_script() {
|
|
|
643
|
+ echo '[Unit]' > $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
644
|
+ echo 'Description=Shuts down the mesh' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
645
|
+ echo 'Before=shutdown.target' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
646
|
+ echo '' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
647
|
+ echo '[Service]' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
648
|
+ echo 'ExecStart=/bin/true' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
649
|
+ echo 'ExecStop=/bin/bash /usr/local/bin/batman stop' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
650
|
+ echo 'RemainAfterExit=yes' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
651
|
+ echo '' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
652
|
+ echo '[Install]' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
653
|
+ echo 'WantedBy=multi-user.target' >> $rootdir/etc/systemd/system/meshshutdown.service
|
|
|
654
|
+ chroot "$rootdir" systemctl enable meshshutdown
|
|
|
655
|
+}
|
|
|
656
|
+
|
642
|
initialise_mesh() {
|
657
|
initialise_mesh() {
|
643
|
if [[ $VARIANT != "mesh"* ]]; then
|
658
|
if [[ $VARIANT != "mesh"* ]]; then
|
644
|
return
|
659
|
return
|
|
|
|
|
672
|
configure_firewall
|
687
|
configure_firewall
|
673
|
install_avahi
|
688
|
install_avahi
|
674
|
install_batman
|
689
|
install_batman
|
|
|
690
|
+ mesh_shutdown_script
|
675
|
install_vpn
|
691
|
install_vpn
|
676
|
install_tomb
|
692
|
install_tomb
|
677
|
#install_tahoelafs
|
693
|
#install_tahoelafs
|