mirror of
https://github.com/YunoHost-Apps/ffsync_ynh.git
synced 2024-09-03 18:26:38 +02:00
modified urls
This commit is contained in:
parent
6d15a15a01
commit
4d96a462cf
4 changed files with 30 additions and 64 deletions
|
@ -36,12 +36,16 @@ then
|
||||||
sudo swapon $tmp_swap_file
|
sudo swapon $tmp_swap_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Modify assets to take path into account
|
||||||
|
sudo find ../sources/syncserver/page/sync_files/ -type f -exec sed -i -e "s@media\/img@$path\/media\/img@g" {} \;
|
||||||
|
|
||||||
# Copy files to the right place
|
# Copy files to the right place
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
sudo cp -a ../sources/* $final_path
|
sudo cp -a ../sources/* $final_path
|
||||||
sudo cp ../conf/ffsync /etc/init.d/
|
sudo cp ../conf/ffsync /etc/init.d/
|
||||||
sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync
|
sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync
|
||||||
|
|
||||||
|
|
||||||
# Set permissions to ffsync directory
|
# Set permissions to ffsync directory
|
||||||
sudo useradd ffsync -d $final_path
|
sudo useradd ffsync -d $final_path
|
||||||
sudo chown ffsync:ffsync -R $final_path
|
sudo chown ffsync:ffsync -R $final_path
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
cornice==0.16.2
|
cornice==0.16.2
|
||||||
gunicorn==19.1.1
|
gunicorn==19.1.1
|
||||||
pyramid==1.5
|
pyramid==1.5
|
||||||
|
pyramid_chameleon==0.3
|
||||||
requests==2.7
|
requests==2.7
|
||||||
simplejson==3.4
|
simplejson==3.4
|
||||||
SQLAlchemy==0.9.4
|
SQLAlchemy==0.9.4
|
||||||
|
|
|
@ -8,6 +8,9 @@ from urlparse import urlparse, urlunparse
|
||||||
|
|
||||||
from pyramid.events import NewRequest, subscriber
|
from pyramid.events import NewRequest, subscriber
|
||||||
from pyramid.static import static_view
|
from pyramid.static import static_view
|
||||||
|
from pyramid.view import view_config
|
||||||
|
from pyramid.renderers import render, render_to_response
|
||||||
|
from pyramid.response import Response
|
||||||
|
|
||||||
import mozsvc.config
|
import mozsvc.config
|
||||||
|
|
||||||
|
@ -87,8 +90,19 @@ def includeme(config):
|
||||||
config.scan("syncserver")
|
config.scan("syncserver")
|
||||||
config.include("syncstorage", route_prefix="/storage")
|
config.include("syncstorage", route_prefix="/storage")
|
||||||
config.include("tokenserver", route_prefix="/token")
|
config.include("tokenserver", route_prefix="/token")
|
||||||
|
config.include('pyramid_chameleon')
|
||||||
|
|
||||||
# Add a top-level explaination view.
|
# Add a top-level explaination view.
|
||||||
|
# First view, available at http://localhost:6543/
|
||||||
|
def page(request):
|
||||||
|
result = render('page/index.pt',
|
||||||
|
{'public_url':public_url},
|
||||||
|
request=request)
|
||||||
|
response = Response(result)
|
||||||
|
return response
|
||||||
|
config.add_route('page', '/')
|
||||||
|
config.add_view(page, route_name='page')
|
||||||
|
|
||||||
www = static_view(
|
www = static_view(
|
||||||
os.path.realpath(os.path.dirname(__file__)+"/page/"),
|
os.path.realpath(os.path.dirname(__file__)+"/page/"),
|
||||||
use_subpath=True
|
use_subpath=True
|
||||||
|
|
|
@ -37,23 +37,6 @@ help support Mozilla.
|
||||||
|
|
||||||
<title>Firefox Sync Server — Keep Synced on your own</title>
|
<title>Firefox Sync Server — Keep Synced on your own</title>
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta property="og:type" content="website">
|
|
||||||
<meta property="og:site_name" content="Mozilla">
|
|
||||||
<meta property="og:locale" content="fr">
|
|
||||||
<meta property="og:url" content="https://www.mozilla.org/fr/firefox/sync/">
|
|
||||||
<meta property="og:image" content="https://www.mozilla.org/media/img/firefox/template/page-image.af8027a425de.png">
|
|
||||||
<meta property="og:title" content="Firefox Sync Server">
|
|
||||||
<meta property="og:description" content="">
|
|
||||||
<meta property="fb:page_id" content="14696440021">
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:site" content="@firefox">
|
|
||||||
<meta name="twitter:domain" content="mozilla.org">
|
|
||||||
<meta name="twitter:app:name:googleplay" content="Firefox">
|
|
||||||
<meta name="twitter:app:id:googleplay" content="org.mozilla.firefox">
|
|
||||||
<meta name="twitter:app:name:iphone" content="Firefox">
|
|
||||||
<meta name="twitter:app:id:iphone" content="989804926">
|
|
||||||
<meta name="twitter:app:name:ipad" content="Firefox">
|
|
||||||
<meta name="twitter:app:id:ipad" content="989804926">
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://www.mozilla.org/media/img/firefox/ios-icon-180.7a8401f21915.png">
|
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://www.mozilla.org/media/img/firefox/ios-icon-180.7a8401f21915.png">
|
||||||
<link rel="icon" type="image/png" sizes="196x196" href="https://www.mozilla.org/media/img/firefox/favicon-196.223e1bcaf067.png">
|
<link rel="icon" type="image/png" sizes="196x196" href="https://www.mozilla.org/media/img/firefox/favicon-196.223e1bcaf067.png">
|
||||||
<link rel="shortcut icon" href="https://www.mozilla.org/media/img/firefox/favicon.dc6635050bf5.ico">
|
<link rel="shortcut icon" href="https://www.mozilla.org/media/img/firefox/favicon.dc6635050bf5.ico">
|
||||||
|
@ -143,9 +126,6 @@ help support Mozilla.
|
||||||
<link rel="alternate" hreflang="zh-TW" href="https://www.mozilla.org/zh-TW/firefox/sync/" title="正體中文 (繁體)">
|
<link rel="alternate" hreflang="zh-TW" href="https://www.mozilla.org/zh-TW/firefox/sync/" title="正體中文 (繁體)">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--[if lte IE 8]>
|
<!--[if lte IE 8]>
|
||||||
|
|
||||||
<script src="/media/js/libs/html5shiv.d580a4cd1cb4.js"></script>
|
<script src="/media/js/libs/html5shiv.d580a4cd1cb4.js"></script>
|
||||||
|
@ -167,32 +147,15 @@ help support Mozilla.
|
||||||
|
|
||||||
<!--<![endif]-->
|
<!--<![endif]-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Google Tag Manager -->
|
|
||||||
<!-- Customized for Mozilla.org-->
|
|
||||||
<!-- Region Container: NONE -->
|
|
||||||
<!-- Rollup Container: System Filtered -->
|
|
||||||
<!-- Site Container: NONE -->
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="sync_files/gtm-snippet-bundle.js" charset="utf-8"></script>
|
<script type="text/javascript" src="sync_files/gtm-snippet-bundle.js" charset="utf-8"></script>
|
||||||
|
|
||||||
<!-- End Google Tag Manager -->
|
<!-- End Google Tag Manager -->
|
||||||
|
|
||||||
<style type="text/css"></style></head>
|
<style type="text/css"></style></head>
|
||||||
|
|
||||||
<body id="firefox-sync" class="html-ltr sky state-fx-31-signed-in">
|
<body id="firefox-sync" class="html-ltr sky state-fx-31-signed-in">
|
||||||
<div id="strings" data-global-close="Fermer" data-global-next="Suivant" data-global-previous="Précédent" data-global-update-firefox="Mettre à jour Firefox"></div>
|
<div id="strings" data-global-close="Close" data-global-next="Next" data-global-previous="Previous" data-global-update-firefox="Update Firefox"></div>
|
||||||
<div id="outer-wrapper">
|
<div id="outer-wrapper" style='background:url("${public_url}/media/img/sandstone/bg-gradient-sky.7ea325995978.png") repeat-x,url("${public_url}/media/img/sandstone/grain.855f29e0c686.png") repeat,#eee;'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,14 +164,14 @@ help support Mozilla.
|
||||||
|
|
||||||
<div class="sticky-wrapper" style=""><header id="fxfamilynav-header" class="fxfamilynav-header dark">
|
<div class="sticky-wrapper" style=""><header id="fxfamilynav-header" class="fxfamilynav-header dark">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a href="https://www.mozilla.org/fr/firefox/products/" class="fxfamilynav-logo">Firefox</a>
|
<a href="https://www.mozilla.org/fr/firefox/products/" class="fxfamilynav-logo" style="background-image:url('${public_url}/media/img/firefox/family/nav-sprite.56fbf5a8d218.png') !important;">Firefox</a>
|
||||||
<nav id="fxfamilynav" class="fxfamilynav" role="navigation">
|
<nav id="fxfamilynav" class="fxfamilynav" role="navigation">
|
||||||
<ul id="fxfamilynav-primary" class="primary-nav">
|
<ul id="fxfamilynav-primary" class="primary-nav">
|
||||||
<li class="related active">
|
<li class="related active">
|
||||||
<a data-id="features" href="https://www.mozilla.org/fr/firefox/features/" class="primary-link" data-link-type="nav" data-link-name="Features"><div>Self-Hosted Synchronisation Server</div></a>
|
<a data-id="features" href="https://www.mozilla.org/fr/firefox/features/" class="primary-link" data-link-type="nav" data-link-name="Features"><div>Self-Hosted Synchronisation Server</div></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="">
|
<li class="">
|
||||||
<a data-id="features" style="width:300px;max-width:350px;" href="#" class="primary-link" data-link-type="nav" data-link-name="Features"><div>Running Mozilla’s Sync-1.5 Server</div></a>
|
<a data-id="features" style="width:300px;max-width:350px;" href="#howto" class="primary-link" data-link-type="nav" data-link-name="Features"><div>Running Mozilla’s Sync-1.5 Server</div></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav><div id="fxfamilynav-adjunctnav" class="fxfamilynav-adjunctnav">
|
</nav><div id="fxfamilynav-adjunctnav" class="fxfamilynav-adjunctnav">
|
||||||
|
@ -244,19 +207,13 @@ help support Mozilla.
|
||||||
|
|
||||||
|
|
||||||
<div id="tabzilla">
|
<div id="tabzilla">
|
||||||
<a href="https://www.mozilla.org/fr/" data-link-type="nav" data-link-name="tabzilla">Mozilla</a>
|
<a href="https://www.mozilla.org/fr/" data-link-type="nav" data-link-name="tabzilla" style="background-image:url('${public_url}/media/img/tabzilla/tabzilla-static.953a65a1f4a4.png') !important;">Mozilla</a>
|
||||||
</div>
|
</div>
|
||||||
</div></header></div>
|
</div></header></div>
|
||||||
|
|
||||||
|
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="sync-anim on complete">
|
<div class="sync-anim on complete">
|
||||||
<div class="device laptop">
|
<div class="device laptop">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -300,7 +257,7 @@ help support Mozilla.
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="primary">
|
<section class="primary">
|
||||||
<div class="inner-wrapper">
|
<div id="howto" class="inner-wrapper">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
@ -354,13 +311,6 @@ help support Mozilla.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="download-button-desktop-release" class="download-button">
|
<div id="download-button-desktop-release" class="download-button">
|
||||||
|
|
||||||
<div class="nojs-download">
|
<div class="nojs-download">
|
||||||
|
@ -595,9 +545,7 @@ help support Mozilla.
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="secondary">
|
<section class="secondary">
|
||||||
<div class="inner-wrapper">
|
<div class="inner-wrapper">
|
||||||
|
@ -615,7 +563,7 @@ help support Mozilla.
|
||||||
with a path of <code>"token/1.0/sync/1.5"</code>:
|
with a path of <code>"token/1.0/sync/1.5"</code>:
|
||||||
</p>
|
</p>
|
||||||
<hr><code>
|
<hr><code>
|
||||||
identity.sync.tokenserver.uri: http://{this page’s url}/token/1.0/sync/1.5
|
identity.sync.tokenserver.uri: ${public_url}/token/1.0/sync/1.5
|
||||||
</code>
|
</code>
|
||||||
<hr><p>
|
<hr><p>
|
||||||
Since Firefox 33, Firefox for Android has supported custom sync servers,
|
Since Firefox 33, Firefox for Android has supported custom sync servers,
|
||||||
|
@ -651,7 +599,7 @@ See <a href="http://160.twinql.com/how-to-file-a-good-android-sync-bug/">how to
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="cta">
|
<section class="cta">
|
||||||
<div class="inner-wrapper">
|
<div class="inner-wrapper" style='background-image:url("${public_url}/media/img/firefox/sync/device-lineup.a60618c7dacb.png") !important;'>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h3>Change the Sync server on each installation</h3>
|
<h3>Change the Sync server on each installation</h3>
|
||||||
|
@ -671,11 +619,10 @@ See <a href="http://160.twinql.com/how-to-file-a-good-android-sync-bug/">how to
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<footer id="colophon" class="">
|
<footer id="colophon" class="">
|
||||||
<nav class="row">
|
<nav class="row">
|
||||||
<div class="col col-1">
|
<div class="col col-1">
|
||||||
<div class="logo"><a href="https://www.mozilla.org/fr/" data-link-type="footer" data-link-name="Mozilla">Mozilla</a></div>
|
<div class="logo"><a href="https://www.mozilla.org/fr/" data-link-type="footer" data-link-name="Mozilla" style='background:url("${public_url}/media/img/sandstone/footer-mozilla.fafef0912042.png") !important;'>Mozilla</a></div>
|
||||||
<p class="license">Portions of this content are ©1998–2016 by individual mozilla.org contributors. Content available under a <a href="https://www.mozilla.org/fr/foundation/licensing/website-content/">Creative Commons license</a>.</p>
|
<p class="license">Portions of this content are ©1998–2016 by individual mozilla.org contributors. Content available under a <a href="https://www.mozilla.org/fr/foundation/licensing/website-content/">Creative Commons license</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-2">
|
<div class="col col-2">
|
Loading…
Reference in a new issue