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 +