alice-wol/DEBIAN/postinst

10 lines
243 B
Bash
Executable File

#!/bin/sh
set -e
interface=$(ip -o -4 route show to default | awk '{print $5}')
# Install and start the systemd service
if ! systemctl enable --now wol@$interface.service; then
echo "Warning: Failed to start your-service.service" >&2
fi