Changeset 897
- Timestamp:
- Mar 21, 2016, 2:18:50 PM (5 years ago)
- Location:
- branches/scripts/smb_init
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripts/smb_init/b4smb.cmd
r886 r897 11 11 */ 12 12 13 ArchLogs = 1 /* Move previous logfiles to archive (by Yuri Dario) */14 DelLogs = 0 /* Remove previous logfiles only */15 KeepGens = 5 /* Keep last 5generations of log files, 0 = all */16 SaveCfg = 1 /* Save a snapshot of the current Samba configuration */17 DelTDBs = 1 /* Remove transient .tdb files */18 DHCPWait = 1 /* wait until an address was obtained by the DHCP server */13 ArchLogs = 1 /* Move previous logfiles to archive (by Yuri Dario) */ 14 DelLogs = 0 /* Remove previous logfiles only */ 15 KeepGens = 10 /* Keep last 10 generations of log files, 0 = all */ 16 SaveCfg = 1 /* Save a snapshot of the current Samba configuration */ 17 DelTDBs = 1 /* Remove transient .tdb files */ 18 DHCPWait = 1 /* wait until an address was obtained by the DHCP server */ 19 19 20 20 /* Setup places */ … … 28 28 if ArchLogs = 1 then do /* Creative logfile archive */ 29 29 ok = SysMkDir(SMB_LOGS'\Archive') 30 Archive = SMB_LOGS||'\Archive\ '||date('s')||'-'||translate(time('n'),'-',':')||".zip"30 Archive = SMB_LOGS||'\Archive\logarc-'||date('S')'-'right('0'||time('M'),4) 31 31 address cmd' zip -jmo9 'Archive' 'SMB_LOGS'\log.?mbd* 'SMB_LOGS'\log.winb*' 32 32 if KeepGens > 0 then do /* Eventually purge old logfile archives */ 33 ok = SysFileTree(SMB_LOGS||'\Archive\ *.zip',logarchs.,"FO")33 ok = SysFileTree(SMB_LOGS||'\Archive\logarc*.zip',logarchs.,"FO") 34 34 if logarchs.0 > KeepGens then do 35 35 do I = 1 to (logarchs.0-KeepGens) … … 50 50 ok = SysMkDir(ETC'\SmbBackup') 51 51 Backup = ETC'\SmbBackup\smbcfg-'date('S')'-'right('0'||time('M'),4) 52 address cmd' zip -rpo9 'Backup' 'ETC'\samba\* 'UNIXETC'\*pwd* 'UNIXETC'\*passw* -x 'ETC'\samba\*.zip >SmbBackup' 52 address cmd' zip -rpo9 'Backup' 'ETC'\samba\* 'UNIXETC'\*pwd* 'UNIXETC'\*passw* -x 'ETC'\samba\*.zip 'ETC'\samba\log\log* >SmbBackup' 53 if KeepGens > 0 then do /* Eventually purge old snapshots */ 54 ok = SysFileTree(ETC'\SmbBackup\smbcfg-*',snapshots.,"FO") 55 if snapshots.0 > KeepGens then do 56 do I = 1 to (snapshots.0-KeepGens) 57 address cmd' del "'snapshots.I 58 end 59 end 60 end 53 61 end 54 62 … … 73 81 end 74 82 75 if WaitDHCPthen do /* Make sure we got network interfaces up and running */83 if DHCPWait then do /* Make sure we got network interfaces up and running */ 76 84 address cmd' dhcpstrt' 77 85 end -
branches/scripts/smb_init/smb.cmd
r844 r897 1 /* Samba Server for eCS (OS/2) init script Version 3.1. 82 Copyright (C) netlabs.org 2007-20121 /* Samba Server for eCS (OS/2) init script Version 3.1.9 2 Copyright (C) bww bitwise works GmbH. 2007-2016 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 517 517 istr = sections.s'.0='p 518 518 interpret istr 519 nextone: 520 end 521 end 519 end 520 nextone: 521 signal on syntax name endloop 522 end 523 endloop: 522 524 ok = stream(samba.!smbconf,'c','close') 523 525 return 0
Note: See TracChangeset
for help on using the changeset viewer.