How can I update several installations at the same time via ssh?
For example one grav-installation in folder A, a second grav-installation in folder B.
"bin/gpm update" is only working within a folder.
See this post for a very efficient approach using Deployer.
Got help and found a solution. :-)
Upload a Script (for example update_grav.sh) with the following content:
----```
!/bin/bash
logfile="/path/to/log/upgrav$(date +%Y%m%d)1.log"
j=0
Setups[j++]="/path/to/installation/grav_installation1"
Setups[j++]="/path/to/installation/grav_installation2"
Setups[j++]="/path/to/installation/grav_installation3"
Add more grav setups as above
echo "### $(date +%Y%m%d_%T) starting update of grav installations " 2>&1 | tee -a ${logfile}
for i in "${Setups[@]}"
do
echo "### $(date +%Y%m%d_%T) update directory $i" | tee -a ${logfile} 2>&1
cd "$i"
bin/gpm selfupgrade -y 2>&1 | tee -a ${logfile}
bin/gpm update -y 2>&1 | tee -a ${logfile}
done
echo "### $(date +%Y%m%d_%T) finished update of grav installations " 2>&1 | tee -a ${logfile}
----```
Than, start your script with "sh update_grav.sh" and relax.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1338 | 9 years ago | ||
| 2 | 927 | 9 years ago | ||
| 2 | 4056 | 9 years ago | ||
| 1 | 2941 | 9 years ago | ||
| 3 | 1112 | 9 years ago |