Browse Source

feat: stop server when generating uid

this should prevent issues when migrating to using uid
pull/4296/head
Daniel Gibbs 2 years ago
parent
commit
c0bd66db41
  1. 2
      lgsm/modules/command_start.sh

2
lgsm/modules/command_start.sh

@ -76,12 +76,12 @@ fn_start_tmux() {
# create uid to ensure unique tmux socket # create uid to ensure unique tmux socket
if [ ! -f "${datadir}/${selfname}.uid" ]; then if [ ! -f "${datadir}/${selfname}.uid" ]; then
command_stop.sh
uid=$(date '+%s' | sha1sum | head -c 8) uid=$(date '+%s' | sha1sum | head -c 8)
echo "${uid}" > "${datadir}/${selfname}.uid" echo "${uid}" > "${datadir}/${selfname}.uid"
socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")" socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")"
fi fi
if [ "${shortname}" == "av" ]; then if [ "${shortname}" == "av" ]; then
cd "${systemdir}" || exit cd "${systemdir}" || exit
else else

Loading…
Cancel
Save