Add sysreset.sh script for resen network or majestic configs

pull/449/head
Igor Zalatov (from Citadel PC) 2022-09-10 15:13:07 +03:00
parent 9684438d23
commit d131608409
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
#!/bin/sh
show_help() {
echo "Usage: $0 [OPTIONS]
-m Reset Majestic config.
-n Reset network config.
-h Show this help.
"
exit 0
}
reset_majestic() {
cp -f /rom/etc/majestic.yaml /etc/majestic.yaml
}
reset_network() {
cp -f /rom/etc/network/interfaces /etc/network/interfaces
}
while getopts hmn flag; do
case ${flag} in
m) reset_majestic ;;
n) reset_network ;;
h) show_help ;;
esac
done
exit 0