Ensure that gogs repos are in the user subdirectory

This commit is contained in:
Bob Mottram 2015-09-24 09:28:57 +01:00
parent afabb934c3
commit 0ab652fcd5
1 changed files with 3 additions and 0 deletions

View File

@ -2595,6 +2595,7 @@ function create_backup_script {
echo 'echo "Obtaining Gogs settings backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'echo "Obtaining Gogs settings backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME
backup_directory_to_usb '/home/git/go/src/github.com/gogits/gogs/custom' 'gogs' backup_directory_to_usb '/home/git/go/src/github.com/gogits/gogs/custom' 'gogs'
echo 'echo "Obtaining Gogs repos backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'echo "Obtaining Gogs repos backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "mv /home/git/gogs-repositories/*.git /home/git/gogs-repositories/$MY_USERNAME" >> /usr/bin/$BACKUP_SCRIPT_NAME
backup_directory_to_usb '/home/git/gogs-repositories' 'gogsrepos' backup_directory_to_usb '/home/git/gogs-repositories' 'gogsrepos'
echo 'echo "Obtaining Gogs authorized_keys backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'echo "Obtaining Gogs authorized_keys backup"' >> /usr/bin/$BACKUP_SCRIPT_NAME
backup_directory_to_usb '/home/git/.ssh' 'gogsssh' backup_directory_to_usb '/home/git/.ssh' 'gogsssh'
@ -3865,6 +3866,7 @@ function backup_to_friends_servers {
echo 'echo "Obtaining Gogs settings backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo 'echo "Obtaining Gogs settings backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
backup_directory_to_friend '/home/git/go/src/github.com/gogits/gogs/custom' 'gogs' backup_directory_to_friend '/home/git/go/src/github.com/gogits/gogs/custom' 'gogs'
echo 'echo "Obtaining Gogs repos backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo 'echo "Obtaining Gogs repos backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo "mv /home/git/gogs-repositories/*.git /home/git/gogs-repositories/$MY_USERNAME" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
backup_directory_to_friend '/home/git/gogs-repositories' 'gogsrepos' backup_directory_to_friend '/home/git/gogs-repositories' 'gogsrepos'
echo 'echo "Obtaining Gogs authorized_keys backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME echo 'echo "Obtaining Gogs authorized_keys backup"' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
@ -9832,6 +9834,7 @@ function create_upgrade_script {
if grep -Fxq "install_gogs" $COMPLETION_FILE; then if grep -Fxq "install_gogs" $COMPLETION_FILE; then
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo '# gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME echo '# gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo "mv /home/git/gogs-repositories/*.git /home/git/gogs-repositories/$MY_USERNAME" >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'cd /home/git/go/src/github.com/gogits/gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME echo 'cd /home/git/go/src/github.com/gogits/gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git stash' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME echo 'git stash' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME