|
Server IP : 111.118.215.156 / Your IP : 216.73.216.76 Web Server : Apache System : Linux md-in-26.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : azasoqqa ( 1858) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/local/bin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!/bin/sh
#
# /etc/init.d/runonce
# chkconfig: 3 95 05
# description: runonce provisioning steps
#
# processname: runonce
# This makes sure that runlevel is set
sleep 60;
for file in /usr/local/runonce.d/*.sh; do
if [ ! -f "$file" ]; then
continue
fi
/bin/bash "$file" &>> /var/log/runonce.log
filen=$(echo $file | cut -d '/' -f 5)
mv "$file" "/usr/local/runonce.d/ran/$filen.$(date +%Y%m%dT%H%M%S)"
/bin/logger -t runonce -p local3.info "$file"
done
if [ -f /usr/local/bin/runonce ]; then
sed -i '\#/usr/local/bin/runonce#d' /var/spool/cron/root
fi