Сервис GLASSFISH
Это работало в Ubuntu Server 12.04
/etc/init.d/glassfish
export AS_JAVA=/usr/lib/jvm/java-7-openjdk-adm64
GLASSFISHPATH=/home/opis/glassfish4/bin
case "$1" in
start)
echo "starting glassfish $GLASSFISHPATH/asadmin start-domain domain1"
sudo -u root $GLASSFISHPATH/asadmin start-domain domain1
;;
restart)
$0 stop
$0 start
;;
stop)
echo "stopping glassfish from $GLASSFISHPATH"
sudo -u root $GLASSFISHPATH/asadmin stop-domain domain1
;;
*)
echo $"usage: $0 (start|stop|restart)"
exit 3
;;
esac
:
сработал sudo service glassfish start, sudo service glassfish stop, sudo service glassfish перезапустился
в Ubuntu Server 18.04 не работает