Autostart Webgrab script inside jail

B0Besh

Cadet
Joined
Dec 30, 2015
Messages
2
Hello,

I've set up Webgrab++ inside jail and is working fine but I do have issue when configuring autostart.

Here is what I've done:
Set up rc.d script:
Code:
#!/bin/sh

. /etc/rc.subr

name=webgrab
rcvar=webgrab_enable

start_cmd="${name}_start"
stop_cmd=":"

load_rc_config $name

webgrab_start()
{
        /usr/local/bin/bash /root/.wg++/run.sh
}
run_rc_command "$1"


Made it executable
Code:
root@webgrab:/ # ls -la /etc/rc.d/webgrab
-rwxrwxrwx  1 root  wheel  212 Dec  3 11:14 /etc/rc.d/webgrab


Added line to /etc/rc.conf
Code:
webgrab_enable="YES"


If I run it looks fine
Code:
root@webgrab:/usr/local/etc # /etc/rc.d/webgrab start

           WebGrab+Plus/w MDB & REX Postprocess -- version  V3.2.0.0 


If I start as service it errors out it's missing mono
Code:
root@webgrab:/usr/local/etc # service webgrab start
Mono required, but it's not installed.


But Mono is installed
Code:
root@webgrab:/usr/local/etc # mono -V
Mono JIT compiler version 5.20.1.34 (5.20.1.34 Sat Nov  6 07:16:40 UTC 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com


I am new to this scripting and already searched the forums and can't find answer. Any help is appreciated.

Thanks
 
Top