Initial commit

This commit is contained in:
2026-01-10 22:22:36 +00:00
commit 89d049ba7a
16 changed files with 318 additions and 0 deletions

20
build/post_install.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
[ "$EUID" -eq 0 ] || { echo "Please run as root"; exit 1; }
SHARE_DIR="/usr/share/sudo-nopasswd"
CONSTANTS="sudo_no_passwd_constants.sh"
source "$SHARE_DIR/$CONSTANTS"
[ -f "$ETC_FILE" ] || touch "$ETC_FILE"
if command -v systemctl >/dev/null 2>&1; then
systemctl enable "$SERVICE_FILE"
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl start "$SERVICE_FILE"
fi
elif command -v rc-update >/dev/null 2>&1; then
chmod +x "$INITD_DIR/$INIT_FILE"
rc-update add "$INIT_FILE" default
rc-service "$INIT_FILE" start
else
echo "Unsupported init system."
fi