aboutsummaryrefslogtreecommitdiff
path: root/src/usr/libexec
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-12-10 10:40:35 -0500
committerB. Stack <bgstack15@gmail.com>2024-12-10 10:40:35 -0500
commit35b46f635ee0089db5e2a8a302f29990c0ace8c6 (patch)
tree3fb0a03c1ff9e29ada20984ea839a9982e056976 /src/usr/libexec
downloadgmm-35b46f635ee0089db5e2a8a302f29990c0ace8c6.tar.gz
gmm-35b46f635ee0089db5e2a8a302f29990c0ace8c6.tar.bz2
gmm-35b46f635ee0089db5e2a8a302f29990c0ace8c6.zip
initial commit
Diffstat (limited to 'src/usr/libexec')
-rwxr-xr-xsrc/usr/libexec/gmm/gmm-mount-helper.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/usr/libexec/gmm/gmm-mount-helper.py b/src/usr/libexec/gmm/gmm-mount-helper.py
new file mode 100755
index 0000000..091385e
--- /dev/null
+++ b/src/usr/libexec/gmm/gmm-mount-helper.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+# vim: set et ts=4 sts=4 sw=4:
+# File: gmm-mount-helper.py
+# Location: /usr/libexec/gmm
+# Author: bgstack15
+# SPDX-License-Identifier: GPL-3.0-only
+# Startdate: 2024-12-04-4 13:12
+# Title: Sudo helper for gmm
+# Purpose: single command to grant sudo access
+# History:
+# Usage:
+# Reference:
+# Improve:
+# Dependencies:
+# dep-devuan: python3-magic
+import argparse, sys, os, magic, subprocess, pathlib
+
+sys.path.append("/usr/share/gmm")
+home_dir = os.getenv("SUDO_HOME",os.getenv("HOME"))
+
+# ADJUST THIS SECTION FOR DEVELOPMENT
+# for prod, this should be ""
+if os.getenv("DEBUG",False):
+ sys.path.append(os.path.join(home_dir,"dev","gmm","src","usr/share/gmm"))
+
+import gmm_lib as gmm
+from gmm_lib import debuglev, ferror
+
+if "__main__" == __name__:
+ # MAIN APP
+ app = gmm.Gmm(gmm.args, is_mount_helper = True)
+ app.cli_main()
bgstack15