~snappy-dev/snappy-hub/snappy-examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

if [ -e ${SNAP_DATA}/message ]; then
    cat ${SNAP_DATA}/message
else
    cat <<EOF2
Hello from the config example!

You can configure this message by running:

$ cat > cfg.yaml <<'EOF'
config:
  config-example:
    msg: |
         Yay!
EOF
$ sudo snappy config config-example cfg.yaml


The message you set there is then displayed when running:
$ config-example.hello

EOF2
fi