* 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
57 lines
1.8 KiB
Bash
Executable file
57 lines
1.8 KiB
Bash
Executable file
#!/bin/sh
|
|
# Execute one BastionGuard system service under Dinit supervision.
|
|
|
|
set -eu
|
|
|
|
name=${1-}
|
|
[ "$#" -eq 1 ] || {
|
|
echo "usage: bastionguard-dinit-run SERVICE" >&2
|
|
exit 64
|
|
}
|
|
|
|
case "$name" in
|
|
BastionGuard-phishing-scanner)
|
|
cd /usr/share/BastionGuard
|
|
exec /usr/bin/BastionGuard-daemon \
|
|
--http-port=81 --https-port=444 \
|
|
--bind-address=127.0.0.2 \
|
|
--page-warning=/usr/share/BastionGuard/data/blocking/block.html
|
|
;;
|
|
BastionGuard-phishing-updater)
|
|
exec /usr/share/BastionGuard/data/scripts/BastionGuard-phishing-updater.sh
|
|
;;
|
|
BastionGuard-phishing-updater-timer)
|
|
exec /usr/libexec/bastionguard/bastionguard-periodic \
|
|
--delay 600 --interval 7200 -- \
|
|
/usr/share/BastionGuard/data/scripts/BastionGuard-phishing-updater.sh
|
|
;;
|
|
BastionGuard-ransomware-realtime)
|
|
exec /usr/bin/BastionGuard-ransomware-realtime
|
|
;;
|
|
bastionguard-sanesecurity)
|
|
exec /usr/libexec/bastionguard/bastionguard-sanesecurity-update
|
|
;;
|
|
bastionguard-sanesecurity-timer)
|
|
exec /usr/libexec/bastionguard/bastionguard-periodic \
|
|
--delay 300 --interval 7200 -- \
|
|
/usr/libexec/bastionguard/bastionguard-sanesecurity-update
|
|
;;
|
|
BastionGuard-usbd)
|
|
exec /usr/bin/BastionGuard-usbd
|
|
;;
|
|
bsc-daemon)
|
|
exec /usr/sbin/bsc-daemon \
|
|
--rules-path /etc/bastionguard-secure-connectiond/rules \
|
|
--ui-socket unix:///tmp/bsd-daemon.sock
|
|
;;
|
|
clamav-clamonacc)
|
|
exec /usr/sbin/clamonacc \
|
|
-F --fdpass \
|
|
--log=/var/log/clamav/clamonacc.log \
|
|
--move=/root/quarantine
|
|
;;
|
|
*)
|
|
echo "Unknown BastionGuard Dinit system service: $name" >&2
|
|
exit 5
|
|
;;
|
|
esac
|