0

I have a headless Rpi2/Raspbian that does nothing else than:

  • connect to Wifi with this /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-ssid "MyWifi"
    wpa-psk "<mypasswordhere>"
    allow-hotplug eth0
    iface eth0 inet dhcp
    
  • start radio with this /etc/systemd/system_radio.service:

    [Unit]
    Description=Radio
    Wants=network-online.target
    After=network.target network-online.target
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/mplayer http://example.com/livestream.mp3 &
    RemainAfterExit=yes
    [Install]
    WantedBy=multi-user.target
    

It works.

Question: how is it possible to move these 2 config files to /boot/, so that I can easily modify the config without SSH, without Linux, just from Windows (micro SD card in my laptop card reader)? (/boot/ is accessible from Windows)

1

You can try to use symlinks:

rpi ~$ sudo mv /etc/network/interfaces /boot/
rpi ~$ sudo ln -s /boot/interfaces /etc/network/interfaces

rpi ~$ sudo mv /etc/systemd/system_radio.service /boot/
fpi ~$ sudo ln -s /boot/system_radio.service /etc/systemd/system_radio.service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.