service glassfish for user glassfish

Script service glassfish v2

— awal file —
GLASSFISHPATH=/usr/local/glassfish/bin
GF_USER=glassfish
ASADMIN=$GLASSFISHPATH/asadmin

SU=”su –login $GF_USER –command ”

case “$1” in
start)
$SU “$ASADMIN start-domain domain1”
;;
stop)
$SU “$ASADMIN stop-domain domain1”
;;
restart)
$SU “$ASADMIN stop-domain domain1”
$SU “$ASADMIN start-domain domain1″
;;
*)
echo $”usage $0 {start|stop|restart}”
exit 1
esac
— akhir file —

simpan sebagai glassfish /etc/init.d/glassfish

chown glassfish:glassfish /etc/init.d/glassfish

update-rc.d glassfish default

Hasil pengalaman ::

> tanpa login terlebih dahulu service glassfish sudah jalan
> service glassfish dijalankan oleh user glassfish BUKAN user root
> service bisa dijalankan lewat client dengan OS MS. Jendelas menggunakan putty

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s