You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cvm/logshell/cvmshell

22 lines
400 B
Plaintext

#!/usr/bin/env python
import sys, subprocess
try:
if sys.argv[1] == "-c":
try:
command = sys.argv[2]
interactive = False
except:
exit(1)
else:
interactive = True
except IndexError:
interactive = True
if interactive == True:
returncode = subprocess.call(["sudo", "/home/cvm/logshell"])
else:
returncode = subprocess.call(["sudo", "/home/cvm/logcmd", command])
exit(returncode)