#!/usr/bin/sh SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) echo $SCRIPT_DIR cp lighthouse.service.default lighthouse.service sed -i 's|WORKING_DIR|'"$SCRIPT_DIR"'|g' lighthouse.service cp ./lighthouse.service /etc/systemd/system/. cp ./lighthouse.timer /etc/systemd/system/. systemctl daemon-reload systemctl enable lighthouse.service systemctl enable lighthouse.timer systemctl start lighthouse.timer echo "All done."