update installer

This commit is contained in:
soruh 2023-03-28 12:53:20 +02:00
parent 894080500b
commit eefb943292

View File

@ -24,8 +24,8 @@ then
exit 1
fi
user_name="centralex"
install_dir="/var/lib/centralex"
user_name="itelex"
install_dir="/home/itelex/"
service_file="/etc/systemd/system/centralex.service"
if [ $# -lt 1 ]; then
@ -52,7 +52,7 @@ case "$step" in
rm rustup.sh
echo "cloning source code..."
git clone https://github.com/soruh/centralex centralex
git clone https://gitea.h.glsys.de/soruh/centralex centralex
echo "creating default config..."
cp centralex/config-template.json centralex/config.json
@ -63,8 +63,8 @@ case "$step" in
exit 1
fi
echo "creating user $user_name..."
useradd -s /usr/sbin/nologin --create-home --home-dir "$install_dir" "$user_name"
# echo "creating user $user_name..."
# useradd -s /usr/sbin/nologin --create-home --home-dir "$install_dir" "$user_name"
echo "creating service file..."
cat > "$service_file" << EOF
@ -72,7 +72,7 @@ case "$step" in
Description=Centralex
[Service]
Enviroment=RUST_BACKTRACE=1
Environment=RUST_BACKTRACE=1
ExecStart=$install_dir/.cargo/bin/cargo run --release
Type=simple
User=centralex