15 lines
510 B
Bash
15 lines
510 B
Bash
#!/bin/sh
|
|
DIR=$(dirname $(readlink -f "$0"))
|
|
cd $DIR
|
|
[ ! -e $DIR/probotic ] && echo "You should run './build.sh' before this script." \
|
|
&& return 1
|
|
# run bootstrapper
|
|
[ ! -e $DIR/bootstrap/ ] && $DIR/bootstrap/bootstrap.sh || return 1
|
|
# generate directories and install
|
|
TARGET=${TARGET-/opt/probotic}
|
|
useradd probotic -r -s /sbin/nologin -d $TARGET
|
|
mkdir -p $TARGET
|
|
install -g probotic -o probotic -m 744 \
|
|
$DIR/bootstrap/probotic_data.sqlite probotic -v $TARGET
|
|
chown probotic:probotic $TARGET -R
|