-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi.sh
executable file
·29 lines (23 loc) · 876 Bytes
/
i.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
#!/bin/bash
cp -rvf check-images.sh $HOME/Documents
cp -rvf update-images.sh $HOME/Documents
cp -rvf verify-images.sh $HOME/Documents
cp -rvf sync-images.sh $HOME/Documents
cd /home/oem/Documents
chmod +x check-images.sh
chmod +x update-images.sh
chmod +x verify-images.sh
chmod +x sync-images.sh
cd /usr/sbin
sudo rm -rvf check-images
sudo rm -rvf update-images
sudo rm -rvf verify-images
sudo rm -rvf sync-images
sudo cp -s $HOME/Documents/check-images.sh check-images
sudo cp -s $HOME/Documents/update-images.sh update-images
sudo cp -s $HOME/Documents/verify-images.sh verify-images
sudo cp -s $HOME/Documents/sync-images.sh sync-images
CRON_JOB="0 18 * * * /home/oem/Documents/sync-images.sh"
# Check if the cron job already exists
(sudo crontab -u root -l | grep -q "$CRON_JOB") || (sudo crontab -u root -l; echo "$CRON_JOB") | sudo crontab -u root -
check-images