Subversion Repositories web_pages

Rev

Rev 17 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 18
Line 268... Line 268...
268
# and get the location on the file system in case we are not running the script from the script directory
268
# and get the location on the file system in case we are not running the script from the script directory
269
$users->{$router}->{'qrLocationFileystem'} = abs_path( $scriptDir . '/' . $qrLocation )
269
$users->{$router}->{'qrLocationFileystem'} = abs_path( $scriptDir . '/' . $qrLocation )
270
   unless exists $users->{$router}->{'qrLocationFileystem'};
270
   unless exists $users->{$router}->{'qrLocationFileystem'};
271
$users->{$router}->{'ovpnLocationFileSystem'} = abs_path( $scriptDir . '/' . $ovpnFileLocation )
271
$users->{$router}->{'ovpnLocationFileSystem'} = abs_path( $scriptDir . '/' . $ovpnFileLocation )
272
   unless exists $users->{$router}->{'ovpnLocationFileSystem'};
272
   unless exists $users->{$router}->{'ovpnLocationFileSystem'};
-
 
273
# finally, copy the download token if it exists
-
 
274
$users->{$router}->{'downloadToken'} = $config->{'downloadToken'}
-
 
275
   if exists $config->{'downloadToken'};
-
 
276
 
-
 
277
#die Dumper( $users ) . "\n";
273
 
278
 
274
 
279
 
275
# ensure the directories exist and give them full access
280
# ensure the directories exist and give them full access
276
make_path( $users->{$router}->{'qrLocationFileystem'}, 0777 ) unless -d $users->{$router}->{'qrLocationFileystem'};
281
make_path( $users->{$router}->{'qrLocationFileystem'}, 0777 ) unless -d $users->{$router}->{'qrLocationFileystem'};
277
make_path( $users->{$router}->{'ovpnLocationFileSystem'}, 0777 ) unless -d $users->{$router}->{'ovpnLocationFileSystem'};
282
make_path( $users->{$router}->{'ovpnLocationFileSystem'}, 0777 ) unless -d $users->{$router}->{'ovpnLocationFileSystem'};
278
 
283
 
279
 
-
 
280
 
-
 
281
# instead of actually going through and cleaning files no longer in the users list,
284
# instead of actually going through and cleaning files no longer in the users list,
282
# just delete all files for this router and recreate them
285
# just delete all files for this router and recreate them
283
&cleanOldDataFiles( $users->{$router}->{'qrLocationFileystem'}, qr/^\Q$router\E_.*\.png$/ );
286
&cleanOldDataFiles( $users->{$router}->{'qrLocationFileystem'}, qr/^\Q$router\E_.*\.png$/ );
284
&cleanOldDataFiles( $users->{$router}->{'ovpnLocationFileSystem'}, qr/^\Q$router\E_.*\.ovpn$/ );
287
&cleanOldDataFiles( $users->{$router}->{'ovpnLocationFileSystem'}, qr/^\Q$router\E_.*\.ovpn$/ );
285
 
288