crab/deployments/source/install.sh
tylermurphy534 0443572477 0.0.6
2022-11-11 15:16:37 -05:00

21 lines
403 B
Bash
Executable file

#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "Please run this as root"
exit
fi
# Copy executable to bin
cp ./target/release/crab /usr/bin/crab
chown root:root /bin/crab
chmod 4755 /bin/crab
# Set up config files
cp pam /etc/pam.d/crab
chmod 600 /etc/pam.d/crab
mkdir /usr/share/crab
chmod 644 /usr/share/crab
cp conf /usr/share/crab/crab.conf
chmod 644 /usr/share/crab/crab.conf