#!/usr/bin/env bash run_directory=$(dirname $(readlink -f "$0")) user=$(whoami) if [ -f $run_directory/.disabled ]; then echo "Installation is disabled. Exiting..." exit 0 fi if [[ $user != 'root' ]]; then sudo="sudo" else sudo="" fi echo "Copying WebSSH unit to system directory..." $sudo cp systemd-templates/boot-sms.service /etc/systemd/system/ $sudo sed -i -e "s:PH_DIRECTORY:$run_directory:g" /etc/systemd/system/boot-sms.service echo "Reloading Systemd..." $sudo systemctl daemon-reload echo "Enabling boot-sms.service..." $sudo systemctl enable boot-sms.service echo "Finished install. Exiting..." exit 0