crab/deployments/source/install.sh

22 lines
411 B
Bash
Raw Normal View History

2022-11-09 00:35:01 +00:00
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "Please run this as root"
exit
fi
# Copy executable to bin
2022-11-09 05:51:47 +00:00
cp ./target/release/crab /usr/bin/crab
2022-11-11 21:29:57 +00:00
chown root:root /usr/bin/crab
chmod 4755 /usr/bin/crab
2022-11-09 00:35:01 +00:00
# Set up config files
cp pam /etc/pam.d/crab
2022-11-11 06:25:10 +00:00
chmod 600 /etc/pam.d/crab
2022-11-09 05:51:47 +00:00
mkdir /usr/share/crab
2022-11-11 20:16:37 +00:00
chmod 644 /usr/share/crab
2022-11-11 06:25:10 +00:00
2022-11-09 05:51:47 +00:00
cp conf /usr/share/crab/crab.conf
2022-11-11 20:16:37 +00:00
chmod 644 /usr/share/crab/crab.conf