peerjs : suite
This commit is contained in:
parent
ec0d3ff9cd
commit
0a6fcfe41f
|
@ -1,16 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
ABSDIR="$( dirname "$(realpath -s -- "$0")" )"
|
||||||
source ${ABSDIR}/../functions.sh
|
source ${ABSDIR}/../functions.sh
|
||||||
source ${ABSDIR}/vars.sh
|
source ${ABSDIR}/vars.sh
|
||||||
|
|
||||||
ensure_pwd_is_scriptdir
|
ensure_pwd_is_scriptdir
|
||||||
ensure_not_root
|
ensure_not_root
|
||||||
|
|
||||||
|
# container should exist
|
||||||
ensure_container_exists ${container_name}
|
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
|
ensure_systemd_as_user_dir_exists
|
||||||
|
|
||||||
podman generate systemd --name ${container_name} > ${HOME}/.config/systemd/user/${service_name}
|
podman generate systemd --files --name ${container_name}
|
||||||
podman stop ${container_name}
|
mv *.service ~/.config/systemd/user/
|
||||||
|
|
||||||
systemctl --user enable ${service_name}
|
systemctl --user enable ${service_name}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
container_name='peerjs-server'
|
container_name='peerjs-server'
|
||||||
service_name="container_${container_name}.service"
|
service_name="container-${container_name}.service"
|
||||||
listen_if='127.0.0.1'
|
listen_if='127.0.0.1'
|
||||||
listen_port='9000'
|
listen_port='9000'
|
||||||
upstream_images='docker.io/peerjs/peerjs-server'
|
upstream_images='docker.io/peerjs/peerjs-server'
|
||||||
|
|
Loading…
Reference in a new issue