Prevent --disabled service from restarting when reloading the snap?

I’m working on my oss tool found at and I started shipping it as a snap. I encountered a weird edge case that I’m hoping someone can help me with.

Kushtaka can act as either a server or a sensor and after you install the snap, you either enable/disable the mode of operation you want.

I noticed that after I run snap refresh kushtaka the --disabled service will be re-enabled.

As I do not want this, I’m wondering how I can account for it? Thoughts?

Thanks in advance!


well, how did you disable the service in the first place ?

if via systemctl, that might indeed be ingored by snapd … you should use snap stop --disable <snap>.<app>, if this does not save the state, then there is a bug somewhere …

[EDIT] I have put this into the snapd category

1 Like

Thanks Ogra. Here are my steps.

  1. $ sudo snap stop --disable kushtakad.server
  2. I release a new version of the snap to the snap store
  3. $ sudo snap refresh kushtakad --edge --devmode
  4. $ sudo snap services
  5. The kushtakad.server is re-enabled

If this sounds like a bug point me to the bug filer and I’ll double check and write it up.


there is no snap reload, you mean refresh, right?

1 Like

Yes. My bad. I’m a snap newb. *corrected the above posts

1 Like

ah, this is discussed here

and there seems to be a bug for it already

1 Like

Beaut. Thanks so much!

Can you try refreshing to the edge channel of the core snap and trying your situation again? we should have this fixed in the edge channel due to

1 Like

I’m shipping a new release some time today. I’ll go through the workflow and document it and let you know. Cheers and yay for OSS!

Thoughts? I’m assuming I screwed up with the core install? Advice or guidance appreciated.


$ sudo snap install core --edge
core (edge) 16-2.42.4+git1579.c9f48be from Canonical✓ installed
$ sudo snap services
Service           Startup   Current   Notes
kushtakad.sensor  enabled   active    -
kushtakad.server  disabled  inactive  -
$ sudo snap refresh kushtakad --devmode
kushtakad (edge) 0.2.12 from Jared Folkins (backwardselvis) refreshed
$ sudo snap services
Service           Startup  Current  Notes
kushtakad.sensor  enabled  active   -
kushtakad.server  enabled  active   -

Are you on Ubuntu Core 18 by any chance?

Again, I’m new to the snap scene, if I’m not giving you good data, let me know the explicit commands. Thanks again!

Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 5.0.0-1023-azure x86_64)
$ uname -a
Linux [redacted] 5.0.0-1023-azure #24~18.04.1-Ubuntu SMP Wed Oct 2 20:23:29 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
name: kushtakad
version: 0.2.12
summary: Kushtakad act as either a server or sensor
description: is a sustainable all-in-one honeypot and honeytoken orchestrator
  for under-resourced Blue Teams.
base: core18
license: Apache-2.0
grade: devel
confinement: devmode
- amd64
    command: kushtakad
    command: kushtakad -sensor
    - network
    - network-bind
    daemon: simple
    command: kushtakad -server
    - network
    - network-bind
    daemon: simple

Hi, I am able to reproduce your issue and am working on a fix, we seem to have a regression.

1 Like

Hi, can you try this again with the core snap from the beta channel?

$ snap refresh core --beta
$ snap version
snap    2.43~pre1
snapd   2.43~pre1
series  16
ubuntu  19.04
kernel  5.0.0-37-generic
host    amd64 

I tested again and am no longer able to reproduce this with the released beta channel. I think the issue previously was that we hadn’t yet actually released a version of snapd with the fix in.