Last active
April 23, 2020 04:31
-
-
Save MikeWills/103b4559f19bbaff6cb039040156c6aa to your computer and use it in GitHub Desktop.
Use this script on your pi-star hotspot to automatically change rooms. Just make a copy for each room you want to go into.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONFIG_FILE="/etc/ysfgateway" | |
TARGET_KEY="Startup" | |
REPLACEMENT_VALUE="FCS00390" | |
# Turn off read-only | |
sudo mount -o remount,rw / ; sudo mount -o remount,rw /boot | |
# Edit /etc/ysfgateway | |
sudo sed -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE | |
# Restart the service | |
sudo service ysfgateway restart | |
# Turn on read-only | |
sudo mount -o remount,ro / ; sudo mount -o remount,ro /boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment