SOLVED How to prevent multiple execution of lines in post_install.sh for custom plugins?

asandiego

Cadet
Joined
Sep 15, 2021
Messages
2
Hi,

I'm trying to build a plugin for Shinobi Video but having some issues. It seems that each line on the script gets executed simultaneously without waiting for each line to finish. Some also gets executed multiple times.

So I modified the post_install script to do some debugging and just 2 lines in the script.

Here's the content of the post_install.sh

Code:
#!/bin/sh

# Download Shinobi repository and copy default config files
git clone https://gitlab.com/Shinobi-Systems/Shinobi.git /usr/local/shinobi

echo "Done installing..."


And here is the output.

Code:
root@freenas:/tmp # iocage fetch -P /tmp/shinobi.json vnet=on dhcp=on
Plugin: shinobi
  Official Plugin: False
  Using RELEASE: 11.3-RELEASE
  Using Branch: 11.3-RELEASE
  Post-install Artifact: https://github.com/allensandiego/iocage-plugin-shinobi.git
  These pkgs will be installed:
    - git
Default mac_prefix specified in defaults.json '1c1b0d' is invalid. Using '1e1b0d' mac prefix instead.

Testing Host DNS response to pkg.FreeBSD.org
Testing shinobi's SRV response to pkg.FreeBSD.org
Testing shinobi's DNSSEC response to pkg.FreeBSD.org

Installing plugin packages:
  - git...

Fetching artifact...
Cloning git repository

Branch 11.3-RELEASE does not exist at https://github.com/allensandiego/iocage-plugin-shinobi.git!
Using "master" branch for plugin, this may not work with your RELEASE

Running post_install.sh
Cloning into '/usr/local/shinobi'...
Done installing...
Cloning into '/usr/local/shinobi'...

Admin Portal:
http://192.168.0.117:8080/super
root@freenas:/tmp #


You may notice that the git command was executed twice.

I came across the documentation for this and found this.

1633092568628.png


Is there anyway to prevent this? Make it execute the script line by line.

Appreciate any help.

Regards,
Allen
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This appears to be a cosmetic bug, but iocage isn't running in parallel. See this older thread:

 

asandiego

Cadet
Joined
Sep 15, 2021
Messages
2
This appears to be a cosmetic bug, but iocage isn't running in parallel. See this older thread:

Thanks. I modified the post_install script to do more debugging and it seems to be the case.
 
Top