PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/cron.daily/samba

http://github.com/brinkman83/bashrc
Shell | 16 lines | 7 code | 2 blank | 7 comment | 3 complexity | f6519535df7964f95cdd7db501bf3ad2 MD5 | raw file
 1#!/bin/sh
 2#
 3# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups.
 4#
 5# Written by Eloy A. Paris <peloy@debian.org> for the Debian project.
 6#
 7
 8BAK=/var/backups
 9
10umask 022
11if cd $BAK; then
12	# Make sure /etc/samba/smbpasswd exists
13	if [ -f /etc/samba/smbpasswd ]; then
14		cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak
15	fi
16fi