瀏覽代碼

Data directory

Bob Mottram 8 年之前
父節點
當前提交
c35aa87649
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/freedombone

+ 5
- 1
src/freedombone 查看文件

9998
 	sed -i 's|files_serve_method.*|files_serve_method = nginx_redirect|g' deployment.ini
9998
 	sed -i 's|files_serve_method.*|files_serve_method = nginx_redirect|g' deployment.ini
9999
 
9999
 
10000
 	# initial data
10000
 	# initial data
10001
-	cp -a data .
10001
+	if [ ! -d $MEDIA_SERVER_WORKING_DIRECTORY/data ]; then
10002
+		echo $'No data directory found'
10003
+		exit 625728
10004
+	fi
10005
+	cp -a $MEDIA_SERVER_WORKING_DIRECTORY/data $MEDIA_SERVER_WORKING_DIRECTORY
10002
 	paster setup-app deployment.ini
10006
 	paster setup-app deployment.ini
10003
 
10007
 
10004
 	# add uwsgi to deployment.ini
10008
 	# add uwsgi to deployment.ini