AutoYADM commit: 2024-12-04 16:20:04
This commit is contained in:
parent
88c5b27c7f
commit
8c93972191
5 changed files with 521 additions and 12 deletions
18
.config/ly/update.sh
Executable file
18
.config/ly/update.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# We define our paths.
|
||||
LOCAL=~/.config/ly/config.ini
|
||||
BAK="$LOCAL.bak"
|
||||
MAIN=/etc/ly/config.ini
|
||||
|
||||
# We don't want to overwrite old backups; so we delimit each backup and
|
||||
# inject the current state of the MAIN file into the backup file.
|
||||
{
|
||||
echo "BAKSTART"
|
||||
cat $MAIN
|
||||
echo "BAKEND"
|
||||
} >>$BAK
|
||||
|
||||
echo "Backup created successfully."
|
||||
sudo cp -f $LOCAL $MAIN
|
||||
echo "Config overwritten."
|
Loading…
Add table
Add a link
Reference in a new issue