Joey Hafner
97e4cc547a
1. homelab [Gitea](https://gitea.jafner.tools/Jafner/homelab), [Github (docker_config)](https://github.com/Jafner/docker_config), [Github (wiki)](https://github.com/Jafner/wiki), [Github (cloud_tools)](https://github.com/Jafner/cloud_tools), [Github (self-hosting)](https://github.com/Jafner/self-hosting). - Rename? Jafner.net? Wouldn't that be `Jafner/Jafner.net/Jafner.net`? 2. Jafner.dev [Github](https://github.com/Jafner/Jafner.dev). 3. dotfiles [Gitea](https://gitea.jafner.tools/Jafner/dotfiles), [Github](https://github.com/Jafner/dotfiles). 4. nvgm [Gitea](https://gitea.jafner.tools/Jafner/nvgm) 5. pamidi [Gitea](https://gitea.jafner.tools/Jafner/pamidi), [Github](https://github.com/Jafner/pamidi) 6. docker-llm-amd [Gitea](https://gitea.jafner.tools/Jafner/docker-llm-amd) 7. doradash [Gitea](https://gitea.jafner.tools/Jafner/doradash) 8. clip-it-and-ship-it [Gitea (PyClipIt)](https://gitea.jafner.tools/Jafner/PyClipIt), [Github](https://github.com/Jafner/clip-it-and-ship-it). 9. razer battery led [Github](https://github.com/Jafner/Razer-BatteryLevelRGB) 10. 5etools-docker [Github](https://github.com/Jafner/5etools-docker) 11. jafner-homebrew [Github](https://github.com/Jafner/jafner-homebrew)
69 lines
1.4 KiB
Bash
69 lines
1.4 KiB
Bash
#!/bin/vbash
|
|
|
|
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
|
|
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
|
|
fi
|
|
|
|
source /opt/vyatta/etc/functions/script-template
|
|
source vyos_secrets.env
|
|
|
|
configure
|
|
|
|
echo "===== Configure firewall... ====="
|
|
{
|
|
source firewall.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure firewall ====="
|
|
}
|
|
|
|
echo "===== Configure interfaces... ====="
|
|
{
|
|
source interfaces.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure interfaces ====="
|
|
}
|
|
|
|
echo "===== Configure NAT... ====="
|
|
{
|
|
source nat.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure NAT ====="
|
|
}
|
|
|
|
echo "===== Configure QoS... ====="
|
|
{
|
|
source qos.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure QoS ====="
|
|
}
|
|
|
|
|
|
echo "===== Configure services... ====="
|
|
{
|
|
source service.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure services ====="
|
|
}
|
|
|
|
|
|
echo "===== Configure system... ====="
|
|
{
|
|
source system.sh > /dev/null
|
|
} || {
|
|
echo "===== Failed to configure system ====="
|
|
}
|
|
|
|
if compare | grep -q 'No changes between working and active configurations.'
|
|
then
|
|
echo "No changes to commit."
|
|
exit
|
|
else
|
|
{ # compare, try commit, save, exit
|
|
compare | strip-private
|
|
commit && save && exit
|
|
} || { # catch, exit discard and print a very basic error message
|
|
exit discard
|
|
echo "Failed to commit and save the configuration."
|
|
}
|
|
fi
|