#!/bin/sh SERVICE_DIR="/etc/systemd/system" find ./ -type f -name '*.service' -print | while read LINE do FILE=$(basename "$LINE" | cut -d '.' -f 1) systemctl enable "$FILE" done