From 57c3227143e4dae94b3644e183d7c823a53220d2 Mon Sep 17 00:00:00 2001 From: Andreas Zuber Date: Sat, 1 Jul 2017 14:20:01 +0200 Subject: [PATCH] add resources from manual build --- src/Syncthing.apparmor | 5 +++++ src/Syncthing.desktop | 8 ++++++++ src/manifest.json | 15 +++++++++++++++ src/syncthing.sh | 12 ++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 src/Syncthing.apparmor create mode 100644 src/Syncthing.desktop create mode 100644 src/manifest.json create mode 100755 src/syncthing.sh diff --git a/src/Syncthing.apparmor b/src/Syncthing.apparmor new file mode 100644 index 0000000..c7e4beb --- /dev/null +++ b/src/Syncthing.apparmor @@ -0,0 +1,5 @@ +{ + "policy_groups": [], + "policy_version": 1.3, + "template": "unconfined" +} diff --git a/src/Syncthing.desktop b/src/Syncthing.desktop new file mode 100644 index 0000000..1a1460b --- /dev/null +++ b/src/Syncthing.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Syncthing +Comment="Syncthing is a continuous file synchronization program" +Type=Application +Icon=syncthing.png +Exec=syncthing.sh +Terminal=false +X-Ubuntu-Touch=true diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..c7c42d3 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "syncthing.zeropointenergy", + "description": "Syncthing is a continuous file synchronization program", + "architecture": "armhf", + "title": "Syncthing", + "hooks": { + "Syncthing": { + "apparmor": "Syncthing.apparmor", + "desktop": "Syncthing.desktop" + } + }, + "version": "0.14.31", + "maintainer": "Jakob Borg", + "framework" : "ubuntu-sdk-15.04.6" +} diff --git a/src/syncthing.sh b/src/syncthing.sh new file mode 100755 index 0000000..cceb11e --- /dev/null +++ b/src/syncthing.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# make sure syncthing gets started if it is not already +# running when starting the webui +pgrep -u $USER -x syncthing > /dev/null || syncthing -no-browser & + +# wait until the web ui responds +until $(wget -O /dev/null -q http://127.0.0.1:8384); do sleep 1; done + +# show the web ui in the webapp-container +webapp-container --webappUrlPatterns=https?://127.0.0.1:8384/* http://127.0.0.1:8384/ %u +