Skip to content
Snippets Groups Projects
Unverified Commit 0b7ece9b authored by Ravi Tripathi's avatar Ravi Tripathi Committed by GitHub
Browse files

Merge branch 'feat-cod-rmq' into feat_black_reformatting

parents 802109f5 d9c9ee8b
No related branches found
No related tags found
3 merge requests!147Merge previous default branch feat-cod-rmq into main,!93Feat black reformatting,!94WIP: Merge feat_prod_rmq with feat_cod_rmq
...@@ -62,12 +62,12 @@ def resolve_uid_gid(ch, method, properties, body): ...@@ -62,12 +62,12 @@ def resolve_uid_gid(ch, method, properties, body):
else: else:
cmd_uid = "/usr/bin/getent passwd | \ cmd_uid = "/usr/bin/getent passwd | \
awk -F: '($3>10000) && ($3<20000) && ($3>maxuid) { maxuid=$3; } END { print maxuid+1; }'" awk -F: 'BEGIN { maxuid=10000 } ($3>10000) && ($3<20000) && ($3>maxuid) { maxuid=$3; } END { print maxuid+1; }'"
msg["uid"] = popen(cmd_uid).read().rstrip() msg["uid"] = popen(cmd_uid).read().rstrip()
logger.info(f"UID query: {cmd_uid}") logger.info(f"UID query: {cmd_uid}")
cmd_gid = "/usr/bin/getent group | \ cmd_gid = "/usr/bin/getent group | \
awk -F: '($3>10000) && ($3<20000) && ($3>maxgid) { maxgid=$3; } END { print maxgid+1; }'" awk -F: 'BEGIN { maxgid=10000 } ($3>10000) && ($3<20000) && ($3>maxgid) { maxgid=$3; } END { print maxgid+1; }'"
msg["gid"] = popen(cmd_gid).read().rstrip() msg["gid"] = popen(cmd_gid).read().rstrip()
logger.info(f"GID query: {cmd_gid}") logger.info(f"GID query: {cmd_gid}")
......
...@@ -24,6 +24,7 @@ Subject = 'New User Account' ...@@ -24,6 +24,7 @@ Subject = 'New User Account'
Info_url = 'https://www.google.com' Info_url = 'https://www.google.com'
Mail_list = 'root@localhost' Mail_list = 'root@localhost'
Mail_list_bcc = 'cmsupport@localhost' Mail_list_bcc = 'cmsupport@localhost'
Support_email = 'support@listserv.uab.edu'
Head = f"""From: {Sender_alias} <{Sender}> Head = f"""From: {Sender_alias} <{Sender}>
To: <{{{{ to }}}}> To: <{{{{ to }}}}>
......
...@@ -29,7 +29,7 @@ def add_account(username, queuename, email, full="", reason=""): ...@@ -29,7 +29,7 @@ def add_account(username, queuename, email, full="", reason=""):
} }
) )
rc_rmq.disconnect() rc_rmq.disconnect()
def worker(ch, method, properties, body): def worker(ch, method, properties, body):
msg = json.loads(body) msg = json.loads(body)
...@@ -98,4 +98,4 @@ def encode_name(uname): ...@@ -98,4 +98,4 @@ def encode_name(uname):
uname_quote = quote(uname) uname_quote = quote(uname)
if "." in uname_quote: if "." in uname_quote:
uname_quote = uname_quote.replace(".", "%2E") uname_quote = uname_quote.replace(".", "%2E")
return uname_quote return uname_quote
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment