solution.
[root@localhost ~]# cat /etc/cron.allow
psadm2
passwd psadm2 (Set a new password)
10 07 * * * nohup sh /home/psadm2/bounce_script.sh &
[psadm2@localhost ~]$ cat /home/psadm2/bounce_script.sh
#!/bin/bash
. /home/psadm2/.bash_profile
export LOG_FILE="/tmp/APPDOM_`date '+%d-%h-%Y'`"
echo "======================`date '+%d-%h-%Y'`======================" > $LOG_FILE 2>&1
echo "Bouncing Appserver PUM APPDOM" >> $LOG_FILE 2>&1
echo "================================================" >> $LOG_FILE 2>&1
# Stop AppServers
psadmin -c shutdown! -d APPDOM >> $LOG_FILE 2>&1
psadmin -c cleanipc -d APPDOM >> $LOG_FILE 2>&1
rm -rf /home/psadm2/psft/pt/8.54/appserv/APPDOM/CACHE >> $LOG_FILE 2>&1
psadmin -c configure -d APPDOM >> $LOG_FILE 2>&1
# Start Appsrevers
psadmin -c boot -d APPDOM >> $LOG_FILE 2>&1
echo "================================================" >> $LOG_FILE 2>&1
No comments:
Post a Comment