BastionGuard/data/init/dinit/bastionguard-dinit-user-run
specialworld83 588e87590d add multi-init support and Gentoo/Alpine packaging
* add support for systemd, OpenRC, SysVinit, and Dinit
* add automatic init-system detection through CMake
* make libsystemd optional for non-systemd builds
* add native service definitions for all supported init systems
* add Gentoo ebuild and Alpine APKBUILD packaging support
* publish the official BastionGuard source repository
* update the README with supported distributions, init systems, repository information, and build documentation
2026-07-21 14:15:32 +02:00

51 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
# Execute one BastionGuard per-user service under a Dinit user manager.
set -eu
name=${1-}
[ "$#" -eq 1 ] || {
echo "usage: bastionguard-dinit-user-run SERVICE" >&2
exit 64
}
case "$name" in
BastionGuard-useragent|BastionGuard-ransomware-alert)
exec /usr/bin/BastionGuard-ransomware-alert
;;
BastionGuard-privacyd)
exec /usr/bin/BastionGuard-privacyd
;;
BastionGuard-ransomware-realtime-alert)
exec /usr/bin/BastionGuard-ransomware-realtime-alert
;;
BastionGuard-ransomware-scanner)
workdir=${HOME:-/tmp}/.local/share/BastionGuard
mkdir -p "$workdir"
cd "$workdir"
exec /usr/bin/BastionGuard-ransomware-scanner \
--0day-protection \
/usr/share/BastionGuard/data/0day_ransomware_protection/ZeroDay.yara
;;
BastionGuard-pacd|bastionguard-pacd)
exec /usr/bin/bastionguard-pacd \
--listen 127.0.0.1 --port 8765 \
--stub-host 127.0.0.1 --stub-port 3129 \
--backend-host 127.0.0.1 --backend-port 3130 \
--trigger-cmd "/usr/libexec/bastionguard/bastionguard-service --user start BastionGuard-cef.service" \
--backend-wait-ms 4000
;;
BastionGuard-mailproxy)
exec /usr/bin/BastionGuard-mailproxy
;;
BastionGuard-user-session-watch)
exec /usr/share/BastionGuard/data/scripts/BastionGuard-user-session-watch.sh
;;
BastionGuard-cef)
exec /usr/bin/bastionguard-cef --listen 127.0.0.1 --port 3130
;;
*)
echo "Unknown BastionGuard Dinit user service: $name" >&2
exit 5
;;
esac