Skip to content

Commit

Permalink
Move /usr/share/scanservjs to /var/lib
Browse files Browse the repository at this point in the history
Closes #695

This is, unfortunately, a breaking change. But it's worth doing sooner rather than later.

Run the following after installing the new version

```sh
sudo mv -v /usr/share/scanservjs/* /var/lib/scanservjs/
sudo rm -rfv /usr/share/scanservjs
```

It will report an error for the preview directory, but that's fine.
  • Loading branch information
sbs20 committed Nov 17, 2023
1 parent f4b8bda commit bfc2c72
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ARG UNAME=scanservjs
# config files need write access).
RUN groupadd -g $GID -o $UNAME \
&& useradd -o -u $UID -g $GID -m -s /bin/bash $UNAME \
&& chown -R $UID:$GID /entrypoint.sh /usr/share/scanservjs /etc/sane.d/net.conf /etc/sane.d/airscan.conf
&& chown -R $UID:$GID /entrypoint.sh /var/lib/scanservjs /etc/sane.d/net.conf /etc/sane.d/airscan.conf
USER $UNAME

# default build
Expand Down
2 changes: 1 addition & 1 deletion app-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scanservjs-server",
"version": "3.0.2",
"version": "3.0.3",
"description": "scanservjs-api is a REST based API to control your scanner.",
"scripts": {
"build": "node build.js",
Expand Down
2 changes: 1 addition & 1 deletion app-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scanservjs-ui",
"version": "3.0.2",
"version": "3.0.3",
"description": "scanservjs is a simple web-based UI for SANE which allows you to share a scanner on a network without the need for drivers or complicated installation.",
"author": "Sam Strachan",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions docs/02-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ To access data from outside the docker container, there are two volumes you may
wish to map:
* The scanned images: use
`--volume /local/path/scans:/usr/share/scanservjs/output`
`--volume /local/path/scans:/var/lib/scanservjs/output`
* Configuration overrides: use `--volume /local/path/cfg:/etc/scanservjs`
## User and group mapping
Expand Down Expand Up @@ -323,7 +323,7 @@ docker run --detach --publish 8080:8080 \

```sh
docker run --detach --publish 8080:8080 \
--volume $HOME/scan-data:/usr/share/scanservjs/output \
--volume $HOME/scan-data:/var/lib/scanservjs/output \
--volume $HOME/scan-cfg:/etc/scanservjs \
--device /dev/bus/usb/001/003:/dev/bus/usb/001/003 \
--name scanservjs-container sbs20/scanservjs:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/04-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sudo su --shell /bin/bash - scanservjs --command 'scanimage --format tiff > test
```

which should output a tif file in the scanservjs home directory
(`/usr/share/scanservjs/`). If you can get this to work then scanservjs should
(`/var/lib/scanservjs/`). If you can get this to work then scanservjs should
be working fine.

## Permissions; `scanimage` works with `sudo` but not without
Expand Down
2 changes: 1 addition & 1 deletion makedeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BASE="./debian"
APP_NAME="scanservjs"
PATH_ETC="/etc/$APP_NAME"
PATH_SYSTEMD="/lib/systemd/system"
PATH_RUNTIME="/usr/share/$APP_NAME"
PATH_RUNTIME="/var/lib/$APP_NAME"
PATH_LIB="/usr/lib/$APP_NAME"
PATH_DOC="/usr/share/doc/$APP_NAME"
DIR_DEBIAN="$BASE/DEBIAN"
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scanservjs",
"version": "3.0.2",
"version": "3.0.3",
"description": "scanservjs is a simple web-based UI for SANE which allows you to share a scanner on a network without the need for drivers or complicated installation.",
"scripts": {
"build:version": "npm --allow-same-version --no-git-tag-version version $npm_package_version --workspaces",
Expand Down

0 comments on commit bfc2c72

Please sign in to comment.