change snap save_dir

This commit is contained in:
Bevan Hunt 2020-01-13 02:56:46 +00:00
parent 152f79f677
commit 93356af5dc
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "broker"
version = "1.4.0"
version = "1.4.1"
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
edition = "2018"
license = "MIT"

View File

@ -160,7 +160,7 @@ async fn main() -> std::result::Result<(), std::io::Error> {
## Install (Linux)
``` sudo snap install broker ```
- does not run as a daemon as requires flags
- the snap saves the database in $HOME/broker_data - this cannot be changed
- the snap saves the database in [$SNAP_DATA/broker_data](https://snapcraft.io/docs/environment-variables) - which is /var/snap/broker/{rev#}/broker_data - where rev# is the revision number
### Run Example

View File

@ -1,6 +1,6 @@
name: broker # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '1.4.0' # just for humans, typically '1.2+git' or '1.3.2'
version: '1.4.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Real-time Zero-Code API Server # 79 char long summary
description: |
The purpose of this library is to be your real-time zero-code API server.
@ -20,5 +20,5 @@ parts:
- pkg-config
apps:
broker:
command: env PATH=$SNAP/bin:$PATH SAVE_PATH=$HOME/broker_data broker
command: env PATH=$SNAP/bin:$PATH SAVE_PATH=$SNAP_DATA/broker_data broker
plugs: [home, network, network-bind]