Skip to content

Commit

Permalink
fix: prevent creation of clone machines after changing snap revision
Browse files Browse the repository at this point in the history
  • Loading branch information
st3v3nmw committed Oct 3, 2024
1 parent 7dfdfd3 commit 92c5b8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions snap/hooks/post-refresh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

if [ -z "$( ls -A '/var/lib/landscape/client' )" ]; then
cp -r /var/lib/landscape/old/client/. /var/lib/landscape/client/
fi
4 changes: 3 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ slots:
annotations:
interface: content
write:
- $SNAP_DATA/var/lib/landscape/client/annotations.d
- $SNAP_COMMON/var/lib/landscape/client/annotations.d

apps:
landscape-client:
Expand Down Expand Up @@ -63,6 +63,8 @@ layout:
/etc/landscape-client.conf:
bind-file: $SNAP_COMMON/etc/landscape-client.conf
/var/lib/landscape/client:
bind: $SNAP_COMMON/var/lib/landscape/client
/var/lib/landscape/old/client:
bind: $SNAP_DATA/var/lib/landscape/client
/var/log/landscape:
bind: $SNAP_DATA/var/log/landscape
Expand Down

0 comments on commit 92c5b8d

Please sign in to comment.