The error "Syntax error: "(" unexpected" occurs because the script is using a function declaration syntax that is not compatible with the shell being used.

To fix this error, you can change the shebang line at the beginning of the script to use a shell that supports the function declaration syntax, such as bash:

#!/bin/bash

Alternatively, you can remove the function declarations and directly define the functions using the syntax:

start() {
    # function code
}

stop() {
    # function code
}

restart() {
    # function code
}

status() {
    # function code
}

After making these changes, the script should run without any syntax errors.

#!binsh# rysh start 启动 stop 停止 restart 重启 status 状态AppName=ruoyi-adminjar# JVM参数JVM_OPTS=-Dname=$AppName -Dusertimezone=AsiaShanghai -Xms512m -Xmx1024m -XXMetaspaceSize=128m -XXMaxMetaspaceSize=512m

原文地址: https://www.cveoy.top/t/topic/i4JC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录