File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 66name=" rebot"
77rcvar=" ${name} _enable"
88pidfile=" /home/rebot/rebasing-xyz-rebot.pid"
9- log_file=" /home/rebot/rebasing-xyz-rebot.log"
109
1110# Load configuration variables
1211load_rc_config " $name "
@@ -27,7 +26,7 @@ cmd="${JAVA_CMD} -jar \
2726 -Dxyz.rebasing.rebot.delete.messages.after=${REBOT_TELEGRAM_DELETE_MESSAGES_AFTER} \
2827 -Dxyz.rebasing.rebot.plugin.openweather.appid=${REBOT_TELEGRAM_OPENWEATHER_APPID} \
2928 -Dquarkus.log.category.\" xyz.rebasing\" .level=${REBOT_TELEGRAM_LOG_LEVEL} \
30- /home/rebot/quarkus-app/quarkus-run.jar > ${log_file} "
29+ /home/rebot/quarkus-app/quarkus-run.jar"
3130# Load environment variables from config file
3231start_precmd=" rebot_prestart"
3332rebot_prestart () {
@@ -58,11 +57,8 @@ rebot_start() {
5857 fi
5958
6059 echo " Starting rebot."
61-
6260 echo " Start Command: ${cmd} "
63-
64- exec su - ${rebot_user} ${cmd} &
65- pgrep -f /home/rebot/quarkus-app/quarkus-run.jar > ${pidfile}
61+ su -m " ${rebot_user} " -c " sh -c '${cmd} & echo \$ ! > \" ${pidfile} \" '"
6662}
6763
6864# Stop command
@@ -79,4 +75,3 @@ rebot_stop() {
7975rc_debug=" YES"
8076run_rc_command " $@ "
8177
82-
You can’t perform that action at this time.
0 commit comments