Info Backup, change, sort,..... DHCP

36
10
NAS
DS218+ DSM 6.2.2-24922-4
Router
  1. RT2600ac
Hey,

Backup, change, sort,..... DHCP (need to test more) but seems to work.

  1. Activate admin account.
  2. Enable ssh
  3. Login with root & pass. = admin pass. => winSCP,...
  4. Go to /etc/dhcpd
  5. => file = dhcpdStatic.ori
  6. Logout
  7. Reboot router
 
This can cleaner but it's a start.
This make a backup from dhcp reservation every day on 4 AM
If you run this the first time it add automatic to crontab
Before run check directory's!
Copy before run the file to your backup dir , need a check
#!/bin/bash USBPLACE="/volumeUSB1/usbshare/@sharebin/Webdav/router" WHATV="$USBPLACE/backup-dhcp.sh" WHAT="0 4 * * * root /bin/sh $WHATV" WHATF="/etc/crontab" TFILE="dhcpdStatic.ori" P1="/etc/dhcpd/$TFILE" P2="$USBPLACE/$TFILE.txt" count=$(grep -c "$WHATV" $WHATF) if [ "$count" -eq 0 ];then echo "$WHAT" >> $WHATF cp -p -f $P2 $P1 fi cp -p -f $P1 $P2
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

You are not missing anything. Feature request would be the best way to get that implemented. I have sent...
Replies
1
Views
381

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top