commit: f1f4c1b568065a94e1d591cf1e4b2232e2223a76 Author: Takuya Wakazono <pastalian46 <AT> gmail <DOT> com> AuthorDate: Sun Oct 27 11:32:11 2024 +0000 Commit: Takuya Wakazono <pastalian46 <AT> gmail <DOT> com> CommitDate: Sun Oct 27 11:32:11 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f1f4c1b5
media-video/syncplay: fix bashisms in the service script Closes: https://bugs.gentoo.org/842885 Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com> media-video/syncplay/files/syncplay-server-init | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/media-video/syncplay/files/syncplay-server-init b/media-video/syncplay/files/syncplay-server-init index 30180757b..6bbe7eea9 100644 --- a/media-video/syncplay/files/syncplay-server-init +++ b/media-video/syncplay/files/syncplay-server-init @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 command="/usr/bin/python" @@ -12,50 +12,50 @@ description="Syncplay Server to synchronize media playback" start() { ebegin "Starting ${name}" - args=() + args="" - if [[ ${port} ]]; then - args+=" --port=${port}" + if [ -n "${port}" ]; then + args="${args} --port=${port}" fi - if [[ ${isolate} == True ]]; then - args+=" --isolate-rooms" + if [ "${isolate}" = True ]; then + args="${args} --isolate-rooms" fi - if [[ ${password} ]]; then - args+=" --password=${password}" + if [ -n "${password}" ]; then + args="${args} --password=${password}" fi - if [[ ${salt} ]]; then - args+=" --salt=${salt}" + if [ -n "${salt}" ]; then + args="${args} --salt=${salt}" fi - if [[ ${motd} ]]; then - args+=" --motd-file=${motd}" + if [ -n "${motd}" ]; then + args="${args} --motd-file=${motd}" fi - if [[ ${noReady} == True ]]; then - args+=" --disable-ready" + if [ "${noReady}" = True ]; then + args="${args} --disable-ready" fi - if [[ ${noChat} == True ]]; then - args+=" --disable-chat" + if [ "${noChat}" = True ]; then + args="${args} --disable-chat" fi - if [[ ${maxChatLength} ]]; then - args+=" --max-chat-message-length=${maxChatLength}" + if [ -n "${maxChatLength}" ]; then + args="${args} --max-chat-message-length=${maxChatLength}" fi - if [[ ${usernameLength} ]]; then - args+=" --max-username-length=${usernameLength}" + if [ -n "${usernameLength}" ]; then + args="${args} --max-username-length=${usernameLength}" fi - if [[ ${statsFile} ]]; then - args+=" --stats-db-file=${statsFile}" + if [ -n "${statsFile}" ]; then + args="${args} --stats-db-file=${statsFile}" fi - if [[ ${tls} ]]; then - args+=" --tls=${tls}" + if [ -n "${tls}" ]; then + args="${args} --tls=${tls}" fi start-stop-daemon --start --background --make-pid --pidfile="${pidfile}" \
