diff options
| author | Emil | 2023-08-04 09:13:47 -0600 |
|---|---|---|
| committer | Emil | 2023-08-04 09:13:47 -0600 |
| commit | 935243d8b4ea992c50315f0c8fcb300365a5762d (patch) | |
| tree | c22d800773997b7b267d5d6cba5931f22ee2be64 /install.sh | |
| download | emil-probotic-935243d8b4ea992c50315f0c8fcb300365a5762d.tar.xz emil-probotic-935243d8b4ea992c50315f0c8fcb300365a5762d.tar.zst | |
Diffstat (limited to 'install.sh')
| -rw-r--r-- | install.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..ce26316 --- /dev/null +++ b/install.sh @@ -0,0 +1,14 @@ +#!/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 |
