mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
commit
1e25e36ce6
195 files changed
+152301
No files matched your search
@@ -0,0 +1,44 @@
|
||||
<<<<<<< HEAD
|
||||
# openwrt_scripts
|
||||
|
||||
## Purpose
|
||||
This directory contains files related to **openwrt scripts**.
|
||||
|
||||
## Contents
|
||||
- `openwrt_snmp_defaults.txt`
|
||||
- `installing_ipref.sh`
|
||||
- `openwrt_full-upgrade.sh`
|
||||
|
||||
## Usage
|
||||
- Review each script or configuration file before running
|
||||
- Some scripts may require **root or sudo**
|
||||
- Paths and variables may need adjustment for your environment
|
||||
|
||||
## Notes
|
||||
- This folder is part of the **public-setupfiles** repository
|
||||
- Files are provided as-is for reference or automation
|
||||
|
||||
## Safety
|
||||
Always back up data before running scripts that modify system state.
|
||||
=======
|
||||
# openwrt_scripts
|
||||
|
||||
## Overview
|
||||
This directory is part of the **public-setupfiles** repository.
|
||||
It contains scripts, configuration files, or resources related to **openwrt_scripts**.
|
||||
|
||||
## Usage
|
||||
- Review scripts before execution
|
||||
- Some files may require **root or sudo privileges**
|
||||
- Paths, variables, or credentials may need customization
|
||||
|
||||
## Logging & Output
|
||||
Scripts may generate logs or output files in the same directory or system locations.
|
||||
|
||||
## Safety Notes
|
||||
- Always back up important data before running scripts
|
||||
- Test in a non-production environment when possible
|
||||
- Use at your own risk
|
||||
|
||||
---
|
||||
>>>>>>> main
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "[+] Updating package list..."
|
||||
opkg update
|
||||
|
||||
echo "[+] Installing iperf3..."
|
||||
opkg install iperf3
|
||||
|
||||
echo "[+] Creating init script..."
|
||||
cat << 'EOF' > /etc/init.d/iperf3-server
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Custom init script to run iperf3 server on boot
|
||||
|
||||
START=99
|
||||
|
||||
start() {
|
||||
logger -t iperf3 "Starting iperf3 server on boot"
|
||||
iperf3 -s -D
|
||||
}
|
||||
|
||||
stop() {
|
||||
logger -t iperf3 "Stopping iperf3 server"
|
||||
killall iperf3
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "[+] Making script executable..."
|
||||
chmod +x /etc/init.d/iperf3-server
|
||||
|
||||
echo "[+] Enabling iperf3 to start at boot..."
|
||||
/etc/init.d/iperf3-server enable
|
||||
|
||||
echo "[+] Starting iperf3 server now..."
|
||||
/etc/init.d/iperf3-server start
|
||||
|
||||
echo "[✓] iperf3 is now running and will auto-start on boot."
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Ensure the script is run as root
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "This script must be run as root. Use sudo or run as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting full OpenWRT upgrade using opkg..."
|
||||
|
||||
# Step 1: Update package lists
|
||||
echo "Updating package lists..."
|
||||
opkg update
|
||||
|
||||
# Step 2: List upgradable packages
|
||||
echo "Listing upgradable packages..."
|
||||
opkg list-upgradable
|
||||
|
||||
# Step 3: Upgrade all installed packages
|
||||
echo "Upgrading installed packages..."
|
||||
opkg list-upgradable | cut -f1 -d ' ' | xargs -r opkg upgrade
|
||||
|
||||
# Step 4: Remove unnecessary packages
|
||||
echo "Removing unnecessary packages..."
|
||||
opkg remove --autoremove
|
||||
|
||||
# Step 5: Clean package cache
|
||||
echo "Cleaning up package cache..."
|
||||
opkg clean
|
||||
|
||||
# Step 6: Restart the device (optional)
|
||||
echo "Upgrade complete. A reboot is recommended."
|
||||
read -p "Do you want to reboot now? (y/N): " REBOOT
|
||||
if [ "$REBOOT" = "y" ] || [ "$REBOOT" = "Y" ]; then
|
||||
echo "Rebooting..."
|
||||
reboot
|
||||
else
|
||||
echo "Reboot skipped. You may need to restart manually."
|
||||
fi
|
||||
|
||||
echo "OpenWRT full upgrade completed!"
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
config agent
|
||||
option agentaddress UDP:161,UDP6:161
|
||||
|
||||
config agentx
|
||||
option agentxsocket /var/run/agentx.sock
|
||||
|
||||
config com2sec public
|
||||
option secname ro
|
||||
option source default
|
||||
option community public
|
||||
|
||||
config com2sec private
|
||||
option secname rw
|
||||
option source localhost
|
||||
option community private
|
||||
|
||||
config com2sec6 public6
|
||||
option secname ro
|
||||
option source default
|
||||
option community public
|
||||
|
||||
config com2sec6 private6
|
||||
option secname rw
|
||||
option source localhost
|
||||
option community private
|
||||
|
||||
config group public_v1
|
||||
option group public
|
||||
option version v1
|
||||
option secname ro
|
||||
|
||||
config group public_v2c
|
||||
option group public
|
||||
option version v2c
|
||||
option secname ro
|
||||
|
||||
config group public_usm
|
||||
option group public
|
||||
option version usm
|
||||
option secname ro
|
||||
|
||||
config group private_v1
|
||||
option group private
|
||||
option version v1
|
||||
option secname rw
|
||||
|
||||
config group private_v2c
|
||||
option group private
|
||||
option version v2c
|
||||
option secname rw
|
||||
|
||||
config group private_usm
|
||||
option group private
|
||||
option version usm
|
||||
option secname rw
|
||||
|
||||
config view all
|
||||
option viewname all
|
||||
option type included
|
||||
option oid .1
|
||||
|
||||
config access public_access
|
||||
option group public
|
||||
option context none
|
||||
option version any
|
||||
option level noauth
|
||||
option prefix exact
|
||||
option read all
|
||||
option write none
|
||||
option notify none
|
||||
|
||||
config access private_access
|
||||
option group private
|
||||
option context none
|
||||
option version any
|
||||
option level noauth
|
||||
option prefix exact
|
||||
option read all
|
||||
option write all
|
||||
option notify all
|
||||
|
||||
config system
|
||||
option sysLocation 'Mothers'
|
||||
option sysContact 'alerts@tyates.one'
|
||||
option sysName 'Mothers Router'
|
||||
# option sysServices 72
|
||||
# option sysDescr 'adult playground'
|
||||
# option sysObjectID '1.2.3.4'
|
||||
|
||||
config exec
|
||||
option name filedescriptors
|
||||
option prog /bin/cat
|
||||
option args /proc/sys/fs/file-nr
|
||||
# option miboid 1.2.3.4
|
||||
|
||||
config engineid
|
||||
# option engineid 'LEDE'
|
||||
option engineidtype '3'
|
||||
option engineidnic 'eth0'
|
||||
|
||||
#config trapcommunity 'trapcommunity'
|
||||
# option community 'public'
|
||||
|
||||
#config trapsink
|
||||
# option host 'nms.system.com'
|
||||
# option community 'public'
|
||||
# option port '162'
|
||||
|
||||
#config trap2sink
|
||||
# option host 'nms.system.com'
|
||||
# option community 'secret'
|
||||
# option port '162'
|
||||
|
||||
#config informsink
|
||||
# option host 'nms.sytem.com'
|
||||
# option community 'public'
|
||||
# option port '162'
|
||||
|
||||
#config authtrapenable 'authtrapenable'
|
||||
# option enable '1'
|
||||
|
||||
#config v1trapaddress 'v1trapaddress'
|
||||
# option host '1.2.3.4'
|
||||
|
||||
#config trapsess 'trapsess'
|
||||
# option trapsess '-v 3 -e 0x80001f88808c18d3f7b0000 -u trapuser -a MD5 -A administrator -l authPriv -x DES -X rootpasswd udp:127.0.0.1:162'
|
||||
|
||||
config snmpd general
|
||||
option enabled '1'
|
||||
# list network 'wan'
|
||||
Reference in new issue
Block a user