이미지 동기화 키 추가

This commit is contained in:
2019-09-22 17:06:53 +00:00
parent b1205edd48
commit 5c5356f3d5
3 changed files with 16 additions and 8 deletions
-6
View File
@@ -14,12 +14,6 @@ if [ ! -f "$samRoot/index.php" ]; then
fi
if [ $HIDCHE_IMAGE_USE_INTERNAL = "yes" ] && [ ! -d "$imageRoot" ]; then
if [[ "$imageRoot" =~ ^ssh ]]; then
query=`echo "<?php \\\$a=parse_url('$imageRoot');echo join(' ', [\\\$a['port']?'-p '.\\\$a['port']:'',\\\$a['host']]);" | php`
ssh-keyscan $query >> /var/www/.ssh/known_hosts 2>/dev/null;
chown www-data:www-data /var/www/.ssh/known_hosts
chmod 600 /var/www/.ssh/known_hosts
fi
gosu www-data git clone $imgGitPath /var/www/html/image
fi