Re: Shared content example - ubuntu-app-platform

2016-11-30 Thread Enwei Zhang
om> wrote: > On 29 November 2016 at 08:36, Enwei Zhang <enwei.zh...@canonical.com> > wrote: > >> Thank you Timo. >> I changed from "./bin" to "/bin", then it works. >> > > > Did you have any luck getting 'write' to work? I'm getting

Re: Shared content example - ubuntu-app-platform

2016-11-22 Thread Enwei Zhang
Hello, Thanks Timo for the good example. While I tried to write two snaps(server to share paths to client) that use content interface to share files, I found "write" slot doesn't work. The code snippet from server side snapcraft.yaml slots: test-share: content: test-content-server

Re: How to restart a simple daemon?

2016-11-20 Thread Enwei Zhang
When your app is stopped, you can also add a "stop-command" when you > define your snapcraft.yaml. Please refer to http://snapcraft.io/docs/ > build-snaps/syntax > > I do not know whether there are any hooks for this purpose. > > Hope this helps! > XiaoGuo >

Re: How to restart a simple daemon?

2016-11-20 Thread Enwei Zhang
Hi Xiaoguo and folks, Is there a notification/callback mechanism so that when snap enable/disable is executed on my snap, my snap can receive notification to do some corresponding actions? Thanks. Br Enwei On Mon, Nov 21, 2016 at 10:50 AM, Enwei Zhang <enwei.zh...@canonical.com> wrote: &

Re: How to restart a simple daemon?

2016-11-20 Thread Enwei Zhang
ot;sudo" to run it on command line. When it is > stable, change it to daemon. > > 2) You can use "snap enable/disable" to toggle the state of the app. When > it is enabled, it starts to run again. In your case, your daemon app will > be restarted. > > Best reg

Re: configure hook

2016-11-15 Thread Enwei Zhang
Hi Didier and folks, I didn't find any bug to track the missing hooks support in snapcraft. Do we need a new one? Thanks. Br Enwei On Tue, Nov 15, 2016 at 6:43 AM, Sergio Schvezov < sergio.schve...@canonical.com> wrote: > El 14/11/16 a las 18:35, Boris Rybalkin escribió: > >> VM has snapd

Re: crontab like snaps or interfaces

2016-11-15 Thread Enwei Zhang
e a écrit : > > Le 14/11/2016 à 02:29, Enwei Zhang a écrit : > >> Hello, > >> I want to ask if there is any snaps or interfaces that could support > >> crontab or systemd.timer or that kind of timed operations. > >> For example, if my snap uses syslog t

Re: Is there any guidance/document about how to write App-provided slots

2016-11-14 Thread Enwei Zhang
Yes, you are right Simon. I am clear now. Thanks a lot. Br Enwei On Mon, Nov 14, 2016 at 9:29 PM, Simon Fels <simon.f...@canonical.com> wrote: > On 14.11.2016 11:56, Enwei Zhang wrote: > > Thanks David. Did you forget to add Morphis and Zyga? :) > > Loop Simon. &

Re: Is there any guidance/document about how to write App-provided slots

2016-11-14 Thread Enwei Zhang
Thu, Nov 10, 2016 at 1:34 AM, David Callé <dav...@framli.eu> wrote: > On 09/11/2016 10:47, Enwei Zhang wrote: > > Hello, > For now, all slots are provided by ubuntu-core. I saw the concept of > App-provided slots from > https://github.com/snapcore/snapd/blob/master/interface

crontab like snaps or interfaces

2016-11-13 Thread Enwei Zhang
Hello, I want to ask if there is any snaps or interfaces that could support crontab or systemd.timer or that kind of timed operations. For example, if my snap uses syslog to save all the logs, how should logrotate work? Thanks so much. Br Enwei -- Snapcraft mailing list

Is there any guidance/document about how to write App-provided slots

2016-11-09 Thread Enwei Zhang
Hello, For now, all slots are provided by ubuntu-core. I saw the concept of App-provided slots from https://github.com/snapcore/snapd/blob/master/interfaces/builtin/basedeclaration.go#L72 But I didn't find any guidance/document about how to do that. Could you please help advise? Thanks so much.

Re: configure hook

2016-11-08 Thread Enwei Zhang
Got it, thanks so much. Br Enwei On Wed, Nov 9, 2016 at 3:38 PM, Didier Roche <didro...@ubuntu.com> wrote: > Le 09/11/2016 à 07:44, Enwei Zhang a écrit : > > Hi Didier, > Sorry to cut in. > Is "hooks" working now in snapcraft? > I encountered error: > I us

Re: configure hook

2016-11-08 Thread Enwei Zhang
Hi Didier, Sorry to cut in. Is "hooks" working now in snapcraft? I encountered error: I used below in snapcraft.yaml: hooks: # Top-level YAML attribute, parallel to `apps` upgrade: # Hook name, corresponds to executable name plugs: [network] # Or any other plugs required by this hook