Bash Betikleri

This commit is contained in:
CaylakPenguen 2014-02-15 06:48:23 +02:00
parent 8ec062dd91
commit 7829233bfe
4 changed files with 97 additions and 0 deletions

7
cron.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# 15 - 02 - 2014
# cron betiklerini Calistirmak icin Betik.
$HOME/.bin/rsync-slack.sh
$HOME/.bin/rsync-mate.sh

32
crontab.txt Normal file
View File

@ -0,0 +1,32 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
# 5 dakikada bir Calisir.
#00-59/5 * * * * $HOME/bin/rsync-slack.sh
# Her Saat Basinda Calisir.
#00 * * * * $HOME/.bin/rsync-slack.sh
# Tum Gorevler icin :-)
00 * * * * $HOME/.bin/cron.sh

5
rsync-mate.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# 12 - 02 - 2014 CaylakPenguen
rsync -av -h --del --stats \
--exclude=14.0/* \
rsync://rsync.slackware.org.uk/msb/ $HOME/iso/Slackware/mateSB/ > $HOME/iso/Slackware/Loglar/rsync-mate-log-`date +%F-%H-%M`.txt

53
rsync-slack.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
# Slackware Yansilama Betigi.
# Caylak Penguen 02 - 02 - 2014 - Pazar
#
#
RSYNC=/usr/bin/rsync
# Yerel Dizin Yolu
LOCALDIR=$HOME/iso/Slackware
# Eşitlenecek Dizin.
TARGETDIR=$LOCALDIR/slackware-current
# Log Dizini
LOGDIR=$LOCALDIR/Loglar
# rsync opsiyonel parametreleri.
#OPSIYON=-avh --stats --del
echo " Basladi >>> `date`" >>$LOGDIR/date.txt
# Nereden Yansi alinacak.
# ftp.slackware.com
# OSUOSL yi Gosteriyor
# RSYNCURL=rsync://ftp.slackware.com
# Oregon State University - Open Source Lab USA ( Birincil Slackware Resmi Yansi )
# RSYNCURL=rsync://rsync.osuosl.org
# RSYNCURK=rsync://slackware.osuosl.org
# Bulgaria Mirrors http://mirrors.unixsol.org (SIk Guncellenmiyor... - 04-02-2012)
# RSYNCURL= rsync://mirrors.unixsol.org
# Yandex Rusya Mirror
# RSYNCURL=rsync://mirror.yandex.ru
# Yunanistan (SIk Guncellenmiyor...)
# RSYNCURL=rsync://ftp.cc.uoc.gr
# Türkiye Linux Kullanıcıları Derneği Sunucusu (SIk Guncellenmiyor... - 04-02-2012)
RSYNCURL=rsync://ftp.linux.org.tr
# Tam yansi Adresi. Sunucu ve yansılanacak dizin.
SLACKURL=$RSYNCURL/slackware/slackware-current
# ---------- Main --------------
# Once Durumu log dosyasina yazsin ;-)
# $RSYNC $RSYNCURL/slackware/ > $LOGDIR/rsync-slackware-log-server-`date +%F-%H-%M`.txt
# Esitleme Islemi..
$RSYNC -av -h --stats --del \
--exclude=source/* \
--exclude=extra/source/* \
$SLACKURL/ $TARGETDIR/ > $LOGDIR/rsync-slackware-log-`date +%F-%H-%M`.txt
echo " Bitti >>> `date`" >>$LOGDIR/date.txt