Showing posts with label autorun. Show all posts
Showing posts with label autorun. Show all posts

Wednesday, October 3, 2018

Auto run idempiere / autostart idempiere

nano /etc/systemd/system/idempiere.service

--copy pastekan ini:
[Unit]
Description=Description for sample script goes here
After=local-fs.target

[Service]
Type=simple
ExecStart=/opt/idempiere-server/idempiere-server.sh
TimeoutStartSec=0

[Install]
WantedBy=default.target
 
--ctrl X to exit and choose save Y
 
--lalu
systemctl daemon-reload
 
systemctl enable idempiere.service
 
systemctl start idempiere.service
 
systemctl reboot
 
--coba
selesai 

Thursday, May 4, 2017

buat service centos

#!/bin/bash
#
# sas        Startup script for the SAS Application Server
#
# chkconfig: - 85 15
# description: SAS Application Server  \
#
# processname: sas
#
SAS_HOME="/opt/jakarta"
start(){
        echo "Starting sas.."
        su -l root -c "/opt/jakarta/bin/startup.sh"
}

stop(){
        echo "Stopping sas.."
        su -l root -c "/opt/jakarta/bin/shutdown.sh"
}

restart(){
        stop
        sleep 60
        start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo "Usage: sas {start|stop|restart}"
        exit 1
esac

exit 0