Browse Source

hestia module is-installed

Ernesto Nicolás Carrea 5 years ago
parent
commit
6bed91e98f
1 changed files with 21 additions and 0 deletions
  1. 21 0
      bin/module/is-installed.inc

+ 21 - 0
bin/module/is-installed.inc

@@ -0,0 +1,21 @@
+#!/bin/bash
+
+hestia_module_is-installed() {
+    source $HESTIA/bin/module/func.inc
+    
+    if [ "$1" ]; then
+        local mod_name=$1
+        shift
+
+        if hestia_module_isinstalled $mod_name; then
+            echo true
+            return 0
+        else
+            echo false
+            return 1
+        fi
+    else
+        echo "Usage: module is-installed MODULE_NAME"
+        return 1
+    fi
+}