From a74ec576fb27a146b2a5f0e100300aa3877ebff2 Mon Sep 17 00:00:00 2001 From: milisbir Date: Tue, 29 Mar 2016 00:16:52 +0000 Subject: [PATCH] mps-log --- bin/mps | 23 ++++++++++++++++++++--- bin/tamir_xfce4-panel_hatasi | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100755 bin/tamir_xfce4-panel_hatasi diff --git a/bin/mps b/bin/mps index b30da3a68..a049d36d6 100755 --- a/bin/mps +++ b/bin/mps @@ -1,7 +1,7 @@ #!/bin/bash . /etc/mpsd.conf . /root/bin/fonks.sh -versiyon="0.1" +versiyon="0.2" iletisim="milisarge@gmail.com" paketdepo="/depo/paketler/" sunucu="192.168.3.193:8000/MPS/" @@ -13,6 +13,7 @@ talimatname_dizin="/root/talimatname" kokdizin="/" VT="/var/lib/pkg/DB" TARIHCE_DIZIN="/var/lib/pkg/tarihce" +LOGDIZIN="/var/log/mps" tekrarkur="hayir" lokal="tr" docsil="evet" @@ -58,6 +59,8 @@ icerik_ekle(){ ldconfig fi ryaz 34 $paketad" paketi kuruldu." + loglama "$paketad paketi kuruldu." + } icerik_ekle2(){ @@ -132,6 +135,7 @@ paket_sil(){ xargs rm -r -f < /tmp/$paket.sil && rm -r -f /var/lib/pkg/DB/"$paket" && ryaz 34 $paket" paketi silindi." + loglama "$paket paketi silindi." fi rm -f /tmp/$paket.sil else @@ -354,6 +358,18 @@ kaynakdizin_kontrol(){ fi } +logdizin_kontrol(){ + if [ ! -d $LOGDIZIN ];then + mkdir $LOGDIZIN + fi + if [ ! -d $LOGDIZIN/derleme ];then + mkdir $LOGDIZIN/derleme + fi + if [ ! -f $LOGDIZIN/mps.log ];then + touch $LOGDIZIN/mps.log + fi +} + tarihce_dkontrol(){ if [ ! -d $TARIHCE_DIZIN ];then mkdir $TARIHCE_DIZIN @@ -437,8 +453,9 @@ tarihce_sil(){ fi } -log_tutma(){ - echo "$(date +'%F %T') - $1 - paket" >> test.log +loglama(){ + logdizin_kontrol + echo "$(date +'%F %T') $1" >> "$LOGDIZIN/mps.log" } git_guncelle() { diff --git a/bin/tamir_xfce4-panel_hatasi b/bin/tamir_xfce4-panel_hatasi new file mode 100755 index 000000000..c6e13e598 --- /dev/null +++ b/bin/tamir_xfce4-panel_hatasi @@ -0,0 +1 @@ +rm -r /root/.cache/sessions/*