mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Bees is meant to be run as root only
As bees is meant to be run as root only, move it to /usr/sbin which is usually not part of normal users path environment.
This commit is contained in:
parent
04cb25bd04
commit
5622ebd411
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ install: lib src test
|
|||||||
install -Dm755 bin/bees $(PREFIX)/usr/libexec/bees
|
install -Dm755 bin/bees $(PREFIX)/usr/libexec/bees
|
||||||
|
|
||||||
install_scripts: ## Install scipts
|
install_scripts: ## Install scipts
|
||||||
install -Dm755 scripts/beesd $(PREFIX)/usr/bin/beesd
|
install -Dm755 scripts/beesd $(PREFIX)/usr/sbin/beesd
|
||||||
install -Dm644 scripts/beesd.conf.sample $(PREFIX)/etc/bees/beesd.conf.sample
|
install -Dm644 scripts/beesd.conf.sample $(PREFIX)/etc/bees/beesd.conf.sample
|
||||||
install -Dm644 scripts/beesd@.service $(PREFIX)/lib/systemd/system/beesd@.service
|
install -Dm644 scripts/beesd@.service $(PREFIX)/lib/systemd/system/beesd@.service
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ readonly CONFIG_DIR=/etc/bees/
|
|||||||
## Pre checks
|
## Pre checks
|
||||||
{
|
{
|
||||||
[ ! -d "$CONFIG_DIR" ] && ERRO "Missing: $CONFIG_DIR"
|
[ ! -d "$CONFIG_DIR" ] && ERRO "Missing: $CONFIG_DIR"
|
||||||
[ "$UID" == "0" ] || ERRO "Must be runned as root"
|
[ "$UID" == "0" ] || ERRO "Must be run as root"
|
||||||
}
|
}
|
||||||
|
|
||||||
command -v /usr/libexec/bees &> /dev/null || ERRO "Missing 'bees' agent"
|
command -v /usr/libexec/bees &> /dev/null || ERRO "Missing 'bees' agent"
|
||||||
|
@ -3,7 +3,7 @@ Description=Bees - Best-Effort Extent-Same, a btrfs deduplicator daemon: %i
|
|||||||
After=local-fs.target
|
After=local-fs.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/beesd %i
|
ExecStart=/usr/sbin/beesd %i
|
||||||
Nice=19
|
Nice=19
|
||||||
IOSchedulingClass=idle
|
IOSchedulingClass=idle
|
||||||
CPUAccounting=true
|
CPUAccounting=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user