2021-05-26 19:54:40 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-01-09 11:56:04 +00:00
|
|
|
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
|
|
source ${ABSDIR}/../functions.sh
|
|
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
|
|
|
ensure_pod_exists ${pod_name}
|
|
|
|
|
|
|
|
ensure_systemd_as_user_dir_exists
|
|
|
|
|
|
|
|
# pod must be running and not managed by systemd
|
|
|
|
podman generate systemd --files --name ${pod_name}
|
|
|
|
mv *.service ~/.config/systemd/user/
|
|
|
|
|
|
|
|
podman pod stop ${pod_name}
|
|
|
|
systemctl --user enable ${service_name}
|