#!/usr/bin/sh # Install systemd service only if it changed (or not there) # Called by the Makefile if cmp $1.service $2/$1.service >/dev/null 2>/dev/null then echo "$1.service has not changed" else echo "install $1.service" cp $1.service $2/$1.service if [ "$2" = "/lib/systemd/system" ] ;then test -x /usr/bin/systemctl && systemctl daemon-reload fi fi