Skip to content

Commit 26f17c6

Browse files
committed
Move scripts to /usr/bin
1 parent 6706340 commit 26f17c6

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: all systemd scripts configs
22

3-
PREFIX := /usr/local
3+
PREFIX := /usr
44

55
SCRIPTS_DIR := $(PREFIX)/bin
66
SYSTEMD_DIR := /etc/systemd/system

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make install
1717
Available config options for `make`:
1818

1919
- `DESTDIR` (default: unset, use this to have `make install` copy things to a build folder or something similar)
20-
- `PREFIX` (default: `/usr/local`)
20+
- `PREFIX` (default: `/usr`)
2121
- `SCRIPTS_DIR` (default: `$(PREFIX)/bin`)
2222
- `SYSTEMD_DIR` (default: `/etc/systemd/system`)
2323
- `CONFIG_DIR` (default: `/etc/camera-streamer.conf.d`)

scripts/add-usb-camera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PORT=$2
1010
DEVICE=$3
1111

1212
CONFIG_DIR=/etc/camera-streamer.conf.d
13-
CONTROL=/usr/local/bin/camera-streamer-control
13+
CONTROL=/usr/bin/camera-streamer-control
1414

1515
## Name
1616

scripts/camera-streamer-control

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ fi
88
action=$1
99
single=$2
1010

11+
CONFIG_DIR=/etc/camera-streamer.conf.d
12+
1113
run-action() {
1214
unit=$1
1315
echo "Running $action for $unit..."
@@ -41,7 +43,7 @@ if [ -z "$single" ] || [[ "$single" == "libcamera" ]]; then
4143
fi
4244

4345
# iterate over all the camera confs in /boot/camera-streamer
44-
for conf in /etc/camera-streamer.conf.d/usb-*.conf; do
46+
for conf in $CONFIG_DIR/usb-*.conf; do
4547
# get the name of the camera
4648
name=$(basename "$conf" .conf)
4749
name=${name#usb-}

scripts/remove-usb-camera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88
NAME=$1
99

1010
CONFIG_DIR=/etc/camera-streamer.conf.d
11-
CONTROL=/usr/local/bin/camera-streamer-control
11+
CONTROL=/usr/bin/camera-streamer-control
1212

1313
if [ -z "$NAME" ]; then
1414
echo "Usage: $0 <name>"

systemd/camera-streamer.service

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ After=network.target
44

55
[Service]
66
Type=oneshot
7-
ExecStart=/usr/local/bin/camera-streamer-control start
8-
ExecStop=/usr/local/bin/camera-streamer-control stop
9-
ExecReload=/usr/local/bin/camera-streamer-control restart
7+
ExecStart=/usr/bin/camera-streamer-control start
8+
ExecStop=/usr/bin/camera-streamer-control stop
9+
ExecReload=/usr/bin/camera-streamer-control restart
1010
RemainAfterExit=yes
1111
KillMode=mixed
1212
TimeoutStopSec=10

0 commit comments

Comments
 (0)