Fix backup row is annotated bug.
This commit is contained in:
parent
69f1be5633
commit
de1b4256d7
|
@ -127,6 +127,11 @@ sudo sed -i 's/^\(backup\t.*\)/#\1/g' /etc/rsnapshot.conf
|
|||
matched_backup_home=$(grep -P "backup\t$HOME" /etc/rsnapshot.conf|xargs)
|
||||
if [ -z $matched_backup_home ]; then
|
||||
sudo sed -i "$(echo "s/^\(#backup\t\/home\/\t\)/backup\t$(echo $HOME|sed 's/\//\\\//g')\tlocalhost\/\n\1/g")" /etc/rsnapshot.conf
|
||||
else
|
||||
matched_backup_home=$(grep -P "(^|\s+)backup\t$HOME" /etc/rsnapshot.conf|xargs)
|
||||
if [ -z $matched_backup_home ]; then
|
||||
sudo sed -i "$(echo "s/[#\s\t]*backup\t$(echo $HOME|sed 's/\//\\\//g')/backup\t$(echo $HOME|sed 's/\//\\\//g')/g")" /etc/rsnapshot.conf
|
||||
fi
|
||||
fi
|
||||
sudo wget -nc http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/raw/master/orbit_logrotate -O /etc/logrotate.d/orbit
|
||||
sudo sed -i "s/rulingcom/$USER/g" /etc/logrotate.d/orbit
|
||||
|
|
Loading…
Reference in New Issue