peerjs : suite

This commit is contained in:
Gitouche 2022-02-10 21:48:57 +01:00
parent ec0d3ff9cd
commit 0a6fcfe41f
2 changed files with 8 additions and 4 deletions

View File

@ -1,16 +1,20 @@
#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
ABSDIR="$( dirname "$(realpath -s -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
# container should exist
ensure_container_exists ${container_name}
# container should NOT be running. Installation script must have stopped it.
ensure_container_not_running ${container_name}
ensure_systemd_as_user_dir_exists
podman generate systemd --name ${container_name} > ${HOME}/.config/systemd/user/${service_name}
podman stop ${container_name}
podman generate systemd --files --name ${container_name}
mv *.service ~/.config/systemd/user/
systemctl --user enable ${service_name}

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
container_name='peerjs-server'
service_name="container_${container_name}.service"
service_name="container-${container_name}.service"
listen_if='127.0.0.1'
listen_port='9000'
upstream_images='docker.io/peerjs/peerjs-server'