Commit b7784140d022b9d6ad8bc62b4a387c446ce4fea2

Authored by Gustavo Duarte
1 parent e2b815c0
Exists in master

Allow CentOS default sync folder path

The official CentOS image uses a non-conventional default sync folder path (/home/vagrant/sync).
See https://github.com/CentOS/sig-cloud-instance-build/pull/34
Search both /vagrant and ~/sync paths for the backup.
Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
@@ -134,8 +134,12 @@ systemctl enable gitlab @@ -134,8 +134,12 @@ systemctl enable gitlab
134 systemctl start gitlab 134 systemctl start gitlab
135 135
136 ##### restore backup 136 ##### restore backup
  137 +if [ -e /vagrant/*_backup.tar ]; then
  138 + backup=$(echo /vagrant/*_backup.tar)
  139 +elif [ -e /home/vagrant/sync/*_backup.tar ]; then
  140 + backup=$(echo /home/vagrant/sync/*_backup.tar)
  141 +fi
137 142
138 -backup=$(echo /vagrant/*_backup.tar)  
139 if [[ -e $backup ]]; then 143 if [[ -e $backup ]]; then
140 printf "####################################################" 144 printf "####################################################"
141 printf "Restaurando backup" 145 printf "Restaurando backup"