Handle:service

De BrapciWiki
Revisão de 19h33min de 13 de maio de 2021 por Renefgj (discussão | contribs)
Ir para navegação Ir para pesquisar

Instalando o Handle.net em modo espelho

crie a pasta hs na raiz e dentro desta baixe e extraia o zip do handle.net através do link no site https://www.handle.net/download_hnr.html

mkdir hs
cd hs
wget https://www.handle.net/hnr-source/handle-9.0.3-distribution.tar.gz
tar -xvzf handle-9.0.3-distribution.tar.gz

Em seguida, rode o script de instalação e siga os passos que serão descritos pelo script.

/hs/handle-9.0.3/bin/hdl-setup-server /hs/svr_1

Rodando em background

/hs/start > /dev/null &

Script

Para registrar um Handle entre em

https://www.handle.net/cgi-bin/others_request2.pl


#!/bin/bash
# /etc/init.d/handle -- startup script for Handle
#
### BEGIN INIT INFO
# Provides:          CEDAP/UFRGS
# Required-Start:    $network $remote_fs $named
# Required-Stop:     $network $remote_fs $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts Handle Server
# Description:       Starts and Stop Handle Server
### END INIT INFO
#
# /etc/init.d/handlePATH=/bin:/usr/bin:/sbin:/usr/sbin
NAME=handle
DESC="Handle Server"
DEFAULT=/hs/
echo "Handle Service"
case "$1" in
   start)
       echo "Iniciando servico."
       echo "448545ct" | /hs/handle-9.2.0/bin/hdl-server /hs/svr_1
       # comando para iniciar o servico
       exit 0
       ;;
   stop)
       echo "Parando servico..."
       # comando para parar o servico
       ;;
   restart)
       echo "Reiniciando servico..."
       # comando para reiniciar o servico
       ;;
   *)
       echo "Operacao invalida - use start|stop|restart"
       exit 1
       ;;
esac
exit 0