-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamkResetlog.sh
executable file
·36 lines (35 loc) · 1010 Bytes
/
amkResetlog.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Set auto error checking
set -e
# AUTHOR : Arlene Kliewer
# TITLE: amkResetlog.sh
# SHELL: bash
#
# NOTE: BASH shell requires -e for escape characters to work
# echo -e "Hello\nWorld"
#
# PURPOSE: Quick Way to reset amkRestart.log file
#
# ----------------------------------------------------------------------
# INCLUDE OTHER SCRIPTS:
#source amkFunctions.sh
#
# ----------------------------------------------------------------------
# MY VARIABLES
mySudoPwd="PurpleM00se"
fName="/var/log/amkRestart.log" # File name variables must have quotes!
amklog="$fName" # File name variables must have quotes!
#
# ----------------------------------------------------------------------
# ACTUAL WORK BEGINS
# ----------------------------------------------------------------------
# SET LOG FILE & PATH
stepName="Resetting the log file."
echo -e "\t\t- $stepName"
if [ -f $fName ] ; then
rm $fName
touch $fName ;
else touch $fName
fi
#
sudo cp /var/log/amkRestart.amk /var/log/amkRestart.log