16 lines
455 B
Bash
16 lines
455 B
Bash
#!/usr/bin/env bash
|
|
|
|
if ! getent passwd cualsea &> /dev/null; then
|
|
sudo useradd -m cualsea -d /var/lib/cualsea -s /bin/bash &&
|
|
sudo mkdir /run/cualsea &&
|
|
sudo chown cualsea:cualsea /run/cualsea/
|
|
fi
|
|
current_dir=$(dirname $(realpath $0));
|
|
cd $current_dir/cualsea-lib &&
|
|
sudo cpan . &&
|
|
cd $current_dir/cualsea-cli &&
|
|
sudo cpan . &&
|
|
cd $current_dir/cualsea-server &&
|
|
sudo cpan .
|
|
sudo install -m 755 $current_dir/cualsead.init /etc/init.d/cualsead
|