cic-staff-installer/setup_systemd.sh

32 lines
1.0 KiB
Bash
Raw Normal View History

2021-11-11 08:29:03 +01:00
mkdir -vp $HOME/.config/systemd/user
mkdir -vp $HOME/.config/environment.d
. aux/bdbg/bdbg.sh
2022-02-14 14:31:24 +01:00
_level=${BASH_DEBUG_LEVEL:-2}
_debug=${BASH_DEBUG:-0}
2021-11-11 08:29:03 +01:00
2021-12-04 17:41:38 +01:00
cp -v systemd/cic-cache-server.service $HOME/.config/systemd/user/
2022-01-27 10:25:17 +01:00
2021-12-04 17:41:38 +01:00
dbg $dbg_debug "writing rendered services file $p"
2021-12-05 07:54:44 +01:00
export PYTHON_BIN_PATH=`. aux/pylocation/pylocation.sh 2> /dev/null`
dbg $dbg_info "using python bin path $PYTHON_BIN_PATH for systemd executables"
2021-12-04 17:41:38 +01:00
PYTHON_BIN_PATH=$PYTHON_BIN_PATH ./aux/bash-templater/templater.sh systemd/cic-cache-tracker.service > $HOME/.config/systemd/user/cic-cache-tracker.service
2021-11-11 08:29:03 +01:00
for f in systemd/env/*.conf; do
2022-02-14 14:31:24 +01:00
b=`basename $f`
p=$HOME/.config/environment.d/$b
dbg $dbg_debug "writing rendered environment file $p"
./aux/bash-templater/templater.sh $f > $p
2021-11-11 08:29:03 +01:00
done
#cp -v systemd/env/*.conf $HOME/.config/environment.d/
cp -v systemd/bin/cic_cache_server_start.sh $HOME/.local/bin/
chmod -v 750 $HOME/.local/bin/cic_cache_server_start.sh
systemctl --user daemon-reload
2022-02-14 14:31:24 +01:00
systemctl --user start cic-cache-tracker
systemctl --user start cic-cache-server