From d841e11548e88f9c4f3b6d74f52cc3b7b1630ed6 Mon Sep 17 00:00:00 2001 From: mbugeia Date: Tue, 17 Mar 2015 01:15:44 +0100 Subject: [PATCH] Fix media content Former-commit-id: 74a7313dcb36f95853236ef7098c6dc624e861b4 --- .gitignore | 218 ++++++++++++++++++++++++++++++++++++++++++++++++ conf/nginx.conf | 3 +- scripts/install | 9 +- scripts/remove | 2 + 4 files changed, 225 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bb1b644 --- /dev/null +++ b/.gitignore @@ -0,0 +1,218 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.publishproj + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[cod] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +.idea \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index a537ad1..1665b98 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -38,6 +38,5 @@ location /seafhttp { location PATHTOCHANGE/media { - rewrite ^PATHTOCHANGE/media(.*)$ /media$1 break; - root ALIASTOCHANGEseafile-server-latest/seahub; + alias ALIASTOCHANGEseafile-server-latest/seahub/media; } diff --git a/scripts/install b/scripts/install index 869a39d..56f9020 100644 --- a/scripts/install +++ b/scripts/install @@ -1,3 +1,4 @@ +#!/bin/bash # Retrieve arguments domain=$1 path=$2 @@ -14,7 +15,6 @@ admin_email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g") port='' findPort () { - port=$1 sudo yunohost app checkport $port @@ -122,12 +122,11 @@ sudo su - www-data -c "$final_path/first_launch.exp $admin_email $admin_password #sudo yunohost app setting seafile skipped_urls -v "/media" #sudo yunohost app setting seafile unprotected_urls -v "/" -if [ "$is_public" = "No" ]; +if [ "$is_public" = "No" ] then - #sudo yunohost app setting seafile unprotected_urls -d - #sudo yunohost app ssowatconf + sudo yunohost app setting seafile unprotected_urls -d else - #sudo yunohost app setting seafile unprotected_urls -v "/" + sudo yunohost app setting seafile unprotected_urls -v "/" fi # register yunohost service diff --git a/scripts/remove b/scripts/remove index 7951f49..5764426 100644 --- a/scripts/remove +++ b/scripts/remove @@ -18,6 +18,8 @@ seafile_port=$(sudo yunohost app setting seafile seafile_port) sudo yunohost firewall disallow $ccnet_port sudo yunohost firewall disallow $seafile_port +sudo yunohost service remove seafile-server + # Restart services sudo service nginx reload sudo yunohost app ssowatconf \ No newline at end of file