Run Service at Boot
Create Bash Script and systemd service to Run /usr/local/apache-ofbiz/gradlew ofbiz at Boot on Ubuntu Server
nano /usr/local/bin/ofbiz_startup.sh
#!/bin/bash
cd /usr/local/apache-ofbiz/
./gradlew ofbiznano /etc/systemd/system/ofbiz_startup.service[Unit]
Description=OFBiz Startup Script
[Service]
Type=simple
ExecStart=/usr/local/bin/ofbiz_startup.sh
[Install]
WantedBy=default.targetsystemctl daemon-reload
systemctl enable ofbiz_startup.service
rebootnano /usr/local/bin/ofbiz_startup.sh
#!/bin/bash
cd /usr/local/apache-ofbiz/
./gradlew ofbiz
crontab -e
1
@reboot /usr/local/bin/ofbiz_startup.shLast updated