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

Currently reading
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
231
Now that I know what happened, yes! Was exciting when Wife wanted to watch Netflix, though!
Replies
4
Views
895
Are you sure it’s not your web browser blocking the connection because you use a self-signed SSL certificate.
Replies
5
Views
1,571
Here is the answer I just got from Synology: As far as the beep is concerned, NAS units will beep when...
Replies
7
Views
3,883
I have a question. So this is network speed issue on your NAS or on your PC? Not sure I picked up what...
Replies
1
Views
1,974

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Back
Top