diff --git a/net-mgmt/p5-GLPI-Agent/Makefile b/net-mgmt/p5-GLPI-Agent/Makefile index dfabed7..221d40c 100644 --- a/net-mgmt/p5-GLPI-Agent/Makefile +++ b/net-mgmt/p5-GLPI-Agent/Makefile @@ -40,7 +40,7 @@ TEST_DEPENDS= p5-HTTP-Proxy>0:www/p5-HTTP-Proxy \ USES= gmake localbase perl5 USE_PERL5= configure -#USE_RC_SUBR= glpi-agent +USE_RC_SUBR= glpiagent USE_GITHUB= nodefault GH_ACCOUNT= glpi-project diff --git a/net-mgmt/p5-GLPI-Agent/files/glpiagent.in b/net-mgmt/p5-GLPI-Agent/files/glpiagent.in new file mode 100644 index 0000000..e7331c3 --- /dev/null +++ b/net-mgmt/p5-GLPI-Agent/files/glpiagent.in @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: glpiagent +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# glpiagent_enable (bool): Set to NO by default. +# Set it to YES to enable. +# + +. /etc/rc.subr + +name=glpiagent +rcvar=glpiagent_enable + +load_rc_config $name + +: ${glpiagent_enable:="NO"} + +pidfile=/var/run/${name}.pid + +command=%%PREFIX%%/bin/glpi-agent +command_args="--daemon --pidfile=${pidfile}" +#command_interpreter=%%PREFIX%%/bin/perl + +run_rc_command "$1" diff --git a/net-mgmt/p5-GLPI-Agent/pkg-plist b/net-mgmt/p5-GLPI-Agent/pkg-plist index 17a538b..47eb0cd 100644 --- a/net-mgmt/p5-GLPI-Agent/pkg-plist +++ b/net-mgmt/p5-GLPI-Agent/pkg-plist @@ -15,6 +15,7 @@ etc/glpi-agent/server-test-plugin.cfg.new etc/glpi-agent/snmp-advanced-support.cfg.new etc/glpi-agent/ssl-server-plugin.cfg.new etc/glpi-agent/toolbox-plugin.cfg.new +etc/rc.d/glpiagent %%PERL5_MAN1%%/glpi-agent.1.gz %%PERL5_MAN1%%/glpi-esx.1.gz %%PERL5_MAN1%%/glpi-injector.1.gz