Skip to content

Commit 2528e8f

Browse files
committed
nologin: Add nologin.py
1 parent 9e50f73 commit 2528e8f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/nologin.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/python3
2+
3+
import sys
4+
from optparse import OptionParser
5+
6+
7+
def nologin():
8+
print("This account is currently not available.")
9+
sys.exit(1)
10+
11+
12+
if __name__ == "__main__":
13+
parser = OptionParser(
14+
usage="Usage: %prog [IGNORED]...",
15+
description="Politely refuse a login.",
16+
add_help_option=False,
17+
)
18+
parser.add_option("--help", action="help", help="show usage information and exit")
19+
20+
parser.parse_args()
21+
22+
nologin()

0 commit comments

Comments
 (0)