You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when the same installer is invoked as a regular system user, the start scripts include wrong paths:
$ ./ejabberd-24.06.49-1-linux-x64.run
Running without superuser privileges (installer wasn't invokedwith "sudo"), cannot perform system-wide installation this way.Continue anyway? (y/n) [n] yInstall ejabberd below /home/badlop/opt? (y/n) [n] yThe following installation paths will be used:- /home/badlop/opt/ejabberd-24.06.49- /home/badlop/opt/ejabberd (existing files won't be modified)
...
$ grep "DIR=" /home/badlop/opt/ejabberd-24.06.49/bin/ejabberd.init
DIR=/home/badlop/home/badlop/opt/ejabberd-24.06.49/bin
$ grep "Exec" /home/badlop/opt/ejabberd-24.06.49/bin/ejabberd.service
ExecStart=/home/badlop/home/badlop/opt/ejabberd-24.06.49/bin/ejabberdctl foreground
ExecStop=/bin/sh -c '/home/badlop/home/badlop/opt/ejabberd-24.06.49/bin/ejabberdctl stop && /home/badlop/home/badlop/opt/ejabberd-24.06.49/bin/ejabberdctl stopped'
ExecReload=/home/badlop/home/badlop/opt/ejabberd-24.06.49/bin/ejabberdctl reload_config
Apparently this problem only affects ejabberd.init and ejabberd.service; fortunately ejabberdctl is perfect. And this only affects when the *.run installer is invoked as a regular user. That would explain why this got undetected for so many time.
I would say that the problem is in the setup script generated by make-installers and included in the binary installers, maybe next to those lines:
So i think this is result of that if section you pointed and next if section being applied one after another, i think we just apply that second one to value that we applied before.
If that's the case maybe substituting those two ifs with this:
if [ "\$code_dir" != '$default_code_dir' ]
then
sed -i "s|$default_code_dir|@CODE_DIR@|g" \
"\$code_dir/bin/${rel_name}ctl" \
"\$code_dir/bin/$rel_name.init" \
"\$code_dir/bin/$rel_name.service"
fi
if [ "\$data_dir" != '$default_data_dir' ]
then
sed -i "s|$default_data_dir|@DATA_DIR@|g" \
"\$code_dir/bin/${rel_name}ctl" \
"\$code_dir/bin/$rel_name.init" \
"\$code_dir/bin/$rel_name.service" \
"\$data_dir/conf/$rel_name.yml" \
"\$data_dir/conf/${rel_name}ctl.cfg"
fi
sed -i "s|@CODE_DIR@|\$code_dir|g;s|@DATA_DIR@|\$data_dir|g" \
"\$code_dir/bin/${rel_name}ctl" \
"\$code_dir/bin/$rel_name.init" \
"\$code_dir/bin/$rel_name.service" \
"\$data_dir/conf/$rel_name.yml" \
"\$data_dir/conf/${rel_name}ctl.cfg"
When ejabberd is installed using a binary installer invoked as root, the start scripts are perfect:
However, when the same installer is invoked as a regular system user, the start scripts include wrong paths:
Apparently this problem only affects
ejabberd.init
andejabberd.service
; fortunatelyejabberdctl
is perfect. And this only affects when the*.run
installer is invoked as a regular user. That would explain why this got undetected for so many time.I would say that the problem is in the
setup
script generated by make-installers and included in the binary installers, maybe next to those lines:ejabberd/tools/make-installers
Line 247 in af99799
The text was updated successfully, but these errors were encountered: