diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index f665de63..52de53b4 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -639,6 +639,21 @@ EOF cp $rootdir/root/$PROJECT_NAME/img/icon_ferment.png $rootdir/etc/patchwork/icon_ferment.png } +mesh_shutdown_script() { + echo '[Unit]' > $rootdir/etc/systemd/system/meshshutdown.service + echo 'Description=Shuts down the mesh' >> $rootdir/etc/systemd/system/meshshutdown.service + echo 'Before=shutdown.target' >> $rootdir/etc/systemd/system/meshshutdown.service + echo '' >> $rootdir/etc/systemd/system/meshshutdown.service + echo '[Service]' >> $rootdir/etc/systemd/system/meshshutdown.service + echo 'ExecStart=/bin/true' >> $rootdir/etc/systemd/system/meshshutdown.service + echo 'ExecStop=/bin/bash /usr/local/bin/batman stop' >> $rootdir/etc/systemd/system/meshshutdown.service + echo 'RemainAfterExit=yes' >> $rootdir/etc/systemd/system/meshshutdown.service + echo '' >> $rootdir/etc/systemd/system/meshshutdown.service + echo '[Install]' >> $rootdir/etc/systemd/system/meshshutdown.service + echo 'WantedBy=multi-user.target' >> $rootdir/etc/systemd/system/meshshutdown.service + chroot "$rootdir" systemctl enable meshshutdown +} + initialise_mesh() { if [[ $VARIANT != "mesh"* ]]; then return @@ -672,6 +687,7 @@ initialise_mesh() { configure_firewall install_avahi install_batman + mesh_shutdown_script install_vpn install_tomb #install_tahoelafs