File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ beaker.session.secret = somesecret
31
31
# scripts module config
32
32
title = Scripts Pony
33
33
tagline = Manage Hostnames for scripts.mit.edu
34
+ keytab = ~/Private/scripts-pony.keytab
35
+ principal = daemon/scripts-pony.mit.edu
34
36
35
37
# If you'd like to fine-tune the individual locations of the cache data dirs
36
38
# for the Cache data, or the Session saves, un-comment the desired settings
Original file line number Diff line number Diff line change 3
3
import threading
4
4
from datetime import datetime , timedelta
5
5
6
+ from tg import config
7
+
6
8
KEYTAB_FILE = None
7
9
principal = None
8
10
9
11
10
- def set (name ):
11
- """Tells the keytab module to look for the daemon/NAME.mit.edu
12
- keytab in ~/Private/NAME.keytab """
12
+ def set (keytab_file , k5principal ):
13
+ """Tells the keytab module to look for the k5principal
14
+ keytab in keytab_file """
13
15
global KEYTAB_FILE , principal
14
- KEYTAB_FILE = os .path .expanduser ("~/Private/%s.keytab" % name )
15
- principal = "daemon/%s.mit.edu" % name
16
+ KEYTAB_FILE = os .path .expanduser (keytab_file )
17
+ principal = k5principal
16
18
17
19
18
20
def exists ():
21
+ if not KEYTAB_FILE :
22
+ set (config .get ('keytab' ), config .get ('principal' ))
19
23
return os .path .exists (KEYTAB_FILE )
20
24
21
25
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
"""The ScriptsPony package"""
3
3
4
- from scripts import log , keytab
4
+ from scripts import log
5
5
6
6
log .set_tag ("Pony" , "pony" )
7
- keytab .set ("scripts-pony" )
You can’t perform that action at this time.
0 commit comments