Skip to content

Commit 746d28a

Browse files
committed
fix: store state information in /var/lib/bloop-box
1 parent 02e454d commit 746d28a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ Copy the resulting binary from the target folder to `/usr/bin/bloop-box`.
4949

5050
#### User setup
5151

52-
Apart from the shared data, you'll need to set up the bloop-box user and its run directory:
52+
Apart from the shared data, you'll need to set up the bloop-box user and its lib directory:
5353

5454
```bash
5555
adduser --system --home /nonexistent --gecos "bloop-box" \
5656
--no-create-home --disabled-password \
5757
--quiet bloop-box
5858
usermod -a -G gpio,spi,audio bloop-box
59-
mkdir -p /run/bloop-box
60-
chown bloop-box:bloop-box /run/bloop-box
59+
mkdir -p /var/lib/bloop-box
60+
chown bloop-box:nogroup /var/lib/bloop-box
6161
```
6262

6363
On a development system, you might want to give the bloop-box user a login shell and a home directory.

debian/postinst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if [ "$1" = "configure" ]; then
1111

1212
usermod -a -G gpio,spi,audio bloop-box
1313

14-
if [ ! -d /run/bloop-box ]; then
15-
mkdir /run/bloop-box
16-
chown bloop-box:nogroup /run/bloop-box
14+
if [ ! -d /var/lib/bloop-box ]; then
15+
mkdir /var/lib/bloop-box
16+
chown bloop-box:nogroup /var/lib/bloop-box
1717
fi
1818
fi
1919

debian/postrm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ purge = "$1" ]; then
77
else
88
echo >&2 "not removing bloop-box system account because deluser command was not found"
99
fi
10-
rm -rf /run/bloop-box
10+
rm -rf /var/lib/bloop-box
1111
fi
1212

1313
#DEBHELPER#

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async fn main() -> Result<()> {
2525
Builder::from_env(Env::default().default_filter_or("debug")).init();
2626

2727
let share_dir = Path::new("/usr/share/bloop-box");
28-
let data_dir = Path::new("/run/bloop-box");
28+
let data_dir = Path::new("/var/lib/bloop-box");
2929
let cache_dir = Path::new(&data_dir).join("cache");
3030

3131
if !cache_dir.is_dir() {

0 commit comments

Comments
 (0)