2022-01-28 12:15:48 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-01-28 12:55:07 +00:00
|
|
|
ABSDIR="$( dirname "$(realpath -s -- "$0")" )"
|
2022-01-28 12:15:48 +00:00
|
|
|
source ${ABSDIR}/../functions.sh
|
|
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
2022-01-28 21:43:55 +00:00
|
|
|
# pod should exist
|
2022-01-28 12:15:48 +00:00
|
|
|
ensure_pod_exists ${pod_name}
|
2022-01-28 21:43:55 +00:00
|
|
|
# pod should NOT be running. Installation script must have stopped it.
|
|
|
|
ensure_pod_not_running ${pod_name}
|
2022-01-28 12:15:48 +00:00
|
|
|
|
|
|
|
ensure_systemd_as_user_dir_exists
|
|
|
|
|
|
|
|
podman generate systemd --files --name ${pod_name}
|
|
|
|
mv *.service ~/.config/systemd/user/
|
|
|
|
|
2022-02-12 12:59:57 +00:00
|
|
|
systemctl --user daemon-reload
|
2022-01-28 12:15:48 +00:00
|
|
|
systemctl --user enable ${service_name}
|