Dynamic python path for systemd exec
This commit is contained in:
parent
a2e96f18b9
commit
52acfda7fc
2
setup.sh
2
setup.sh
@ -14,6 +14,8 @@ PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8
|
|||||||
PIP_INDEX_URL=${PIP_INDEX_URL:-"https://pypi.org/simple"}
|
PIP_INDEX_URL=${PIP_INDEX_URL:-"https://pypi.org/simple"}
|
||||||
CIC_SETUP_TRUSTED_FINGERPRINT=${CIC_SETUP_TRUSTED_FINGERPRINT:-0826EDA1702D1E87C6E2875121D2E7BB88C2A746}
|
CIC_SETUP_TRUSTED_FINGERPRINT=${CIC_SETUP_TRUSTED_FINGERPRINT:-0826EDA1702D1E87C6E2875121D2E7BB88C2A746}
|
||||||
CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net}
|
CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net}
|
||||||
|
default_python_path=$(dirname $(which python))
|
||||||
|
PYTHON_BIN_PATH=${PYTHON_BIN_PATH:-$default_python_path}
|
||||||
|
|
||||||
if [ "$UID" -eq 0 ]; then
|
if [ "$UID" -eq 0 ]; then
|
||||||
dbg $dbg_error "This cannot be run as root"
|
dbg $dbg_error "This cannot be run as root"
|
||||||
|
@ -6,7 +6,11 @@ mkdir -vp $HOME/.config/environment.d
|
|||||||
_level=2
|
_level=2
|
||||||
_debug=1
|
_debug=1
|
||||||
|
|
||||||
cp -v systemd/*.service $HOME/.config/systemd/user/
|
cp -v systemd/cic-cache-server.service $HOME/.config/systemd/user/
|
||||||
|
cp -v systemd/bloxberg.service $HOME/.config/systemd/user/
|
||||||
|
dbg $dbg_debug "writing rendered services file $p"
|
||||||
|
PYTHON_BIN_PATH=$PYTHON_BIN_PATH ./aux/bash-templater/templater.sh systemd/cic-cache-tracker.service > $HOME/.config/systemd/user/cic-cache-tracker.service
|
||||||
|
|
||||||
for f in systemd/env/*.conf; do
|
for f in systemd/env/*.conf; do
|
||||||
b=`basename $f`
|
b=`basename $f`
|
||||||
p=$HOME/.config/environment.d/$b
|
p=$HOME/.config/environment.d/$b
|
||||||
|
@ -3,7 +3,7 @@ Description=CIC transaction cache syncer
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=%h/.local/bin/cic-cache-trackerd -c %h/.config/cic/cache
|
ExecStart={{PYTHON_BIN_PATH}}/cic-cache-trackerd -c %h/.config/cic/cache
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user