File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 2323
2424my $ug = Data::UUID-> new();
2525my $key = $ug -> create_str();
26+
27+ if ( ! defined $groups ) {
28+ print " !!!! NO Groups for user $user !!!!\n " ;
29+ print " you will have to set manually via mongodb\n " ;
30+ }
31+
2632my $record = {
2733 apikey => $key ,
2834 groups => $groups ,
2935 username => $user ,
3036};
3137
3238my $apikeycol = $mongo -> collection(' Apikey' );
33- my $apikey = $apikeycol -> create_from_api ($record );
39+ my $apikey = $apikeycol -> create ($record );
3440
3541
Original file line number Diff line number Diff line change @@ -354,22 +354,19 @@ function setup_scot_admin {
354354
355355function restart_daemons {
356356
357+ SCOTSERVICES=' scot scfd scrfd scepd recfpd'
357358 if [[ " $SCOT_RESTART_DAEMONS " == " yes" ]] || [[ " $INSTMODE " != " SCOTONLY" ]]; then
359+ for service in $SCOTSERVICES ; do
358360 if [[ $OS == " Ubuntu" ]]; then
359361 if [[ $OSVERSION == " 14" ]]; then
360- service scfd restart
361- service scrfd restart
362- service scepd restart
362+ service $service restart
363363 else
364- systemctl --no-pager restart scfd.service
365- systemctl --no-pager restart scrfd.service
366- systemctl --no-pager restart scepd.service
364+ systemctl --no-pager restart " ${service} .service"
367365 fi
368366 else
369- systemctl --no-pager restart scfd.service
370- systemctl --no-pager restart scrfd.service
371- systemctl --no-pager restart scepd.service
367+ systemctl --no-pager restart " ${service} .service"
372368 fi
369+ done
373370 fi
374371}
375372
You can’t perform that action at this time.
0 commit comments