update installer
This commit is contained in:
parent
894080500b
commit
eefb943292
12
install.sh
12
install.sh
@ -24,8 +24,8 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
user_name="centralex"
|
user_name="itelex"
|
||||||
install_dir="/var/lib/centralex"
|
install_dir="/home/itelex/"
|
||||||
service_file="/etc/systemd/system/centralex.service"
|
service_file="/etc/systemd/system/centralex.service"
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
@ -52,7 +52,7 @@ case "$step" in
|
|||||||
rm rustup.sh
|
rm rustup.sh
|
||||||
|
|
||||||
echo "cloning source code..."
|
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..."
|
echo "creating default config..."
|
||||||
cp centralex/config-template.json centralex/config.json
|
cp centralex/config-template.json centralex/config.json
|
||||||
@ -63,8 +63,8 @@ case "$step" in
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "creating user $user_name..."
|
# echo "creating user $user_name..."
|
||||||
useradd -s /usr/sbin/nologin --create-home --home-dir "$install_dir" "$user_name"
|
# useradd -s /usr/sbin/nologin --create-home --home-dir "$install_dir" "$user_name"
|
||||||
|
|
||||||
echo "creating service file..."
|
echo "creating service file..."
|
||||||
cat > "$service_file" << EOF
|
cat > "$service_file" << EOF
|
||||||
@ -72,7 +72,7 @@ case "$step" in
|
|||||||
Description=Centralex
|
Description=Centralex
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Enviroment=RUST_BACKTRACE=1
|
Environment=RUST_BACKTRACE=1
|
||||||
ExecStart=$install_dir/.cargo/bin/cargo run --release
|
ExecStart=$install_dir/.cargo/bin/cargo run --release
|
||||||
Type=simple
|
Type=simple
|
||||||
User=centralex
|
User=centralex
|
||||||
|
Loading…
Reference in New Issue
Block a user