xlock/install.sh

21 lines
507 B
Bash
Executable File

#!/bin/bash
user=`whoami`
local_d="$(realpath `dirname $0`)";
bin_d="/usr/sbin/";
systemd_d="/usr/lib/systemd/system";
# copy lock script
printf "(1) copying xlock executable\n";
sudo cp "$local_d/src/xlock" "$bin_d/xlock";
sudo chmod +x "$bin_d/xlock";
# copy systemd files
printf "(2) copying systemd units\n";
sudo cp $local_d/systemd/* "$systemd_d";
# enable path
printf "(3) enabling systemd watcher\n";
sudo systemctl enable "xlock@$user.path" > /dev/null 2>&1;
printf "\n . install sucessful\n"