Springboot starts, closes, and restarts scripts in Linux as jar packages
Start the
Write the startup script startup.sh
#!/bin/bash echo Starting application
/ etc/profile
nohup java -jar test.jar &
authorization
chmod +x startup.sh
Shut down
Write the close script stop.sh
#!/bin/bash PID=$(ps -ef | grep test.jar | grep -v grep | awk '{ print $2 }') if [ -z "$PID" ] then echo Application is already stopped else echo kill $PID kill $PID fi
authorization
chmod +x stop.sh
restart
Write the restart script restart. Sh
#!/bin/bash echo Stopping application source ./stop.sh echo Starting application source ./startup.sh
authorization
chmod +x restart.sh
Read More:
- Ubuntu starts or restarts SSH service
- Idea introduces dependency and starts jar error in opening zip file
- Self test error when springboot accesses es and starts
- Error creating bean with name usercontroller appears when springboot starts
- An error is reported when springboot starts: error creating bean with name ‘XXXX’
- Update project manually_ Solution of too large jar package in springboot
- Java jar close startup script
- Errors occured, no packages were upgraded. ⇒ ERROR: Failed to install packages to new root.
- R language packages installation failed: Error in install.packages: error reading from connection
- Encryption unsuccessful, need to factory reset or crash after android restarts several times
- Java cpp-0.11.jar, opencv-windows-x86_ 64.jar,opencv-2.4.11-0.11.jar
- [vulnerability recurrence] phpMyAdmin scripts / setup.php deserialization vulnerability (wooyun-2016-199433)
- Error building player because scripts have compile errors in the editor
- How to select the jar package version for Maven package when the jar package versions referenced by multiple modules are inconsistent
- Zip to decompress the jar package, like the add file in the jar package
- Error building Player because scripts had compiler errors when packaging ab package
- It will appear as soon as it is turned on BTServer.exe -Application error (0xc0150002)
- File C:\Users\admin\Documents\WindowsPowerShell\profile.ps1 cannot be loaded because running scripts
- The remote port occupation of Linux startup jar package script reports an error
- recipe for target ‘scripts/extract-cert‘ failed