summaryrefslogtreecommitdiff
path: root/install.sh
blob: 8cbb06c36856dd1fea74c4bb8f79bd6d4d7174ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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 /bin/crab
chown root:root /bin/crab
chmod 6755 /bin/crab

# Set up config files
cp pam /etc/pam.d/crab
cp -n conf /etc/crab.conf
chmod 660 /etc/crab.conf