Move autoreboot job to more-common-settings.sh
This commit is contained in:
parent
63011e657d
commit
b7f4414f5a
3 changed files with 23 additions and 8 deletions
4
full.zsh
4
full.zsh
|
@ -113,10 +113,6 @@ echo "[DSMOSS] Install more networking tools..."
|
|||
brew install cloudflared miniupnpc
|
||||
brew install --cask cyberduck
|
||||
|
||||
# Add auto-reboot job cron job....
|
||||
echo "[DSMOSS] Add auto-reboot cron job..."
|
||||
(sudo crontab -l 2>/dev/null; echo "0 0 * * 0 /sbin/shutdown -r now") | sort -u | sudo crontab -
|
||||
|
||||
# More common settings...
|
||||
echo "[DSMOSS] Run the more common settings script..."
|
||||
chmod +x "more-common-settings.sh"
|
||||
|
|
4
lite.zsh
4
lite.zsh
|
@ -110,10 +110,6 @@ echo "[DSMOSS] Install more networking tools..."
|
|||
brew install cloudflared miniupnpc
|
||||
brew install --cask cyberduck
|
||||
|
||||
# Add auto-reboot job cron job....
|
||||
echo "[DSMOSS] Add auto-reboot cron job..."
|
||||
(sudo crontab -l 2>/dev/null; echo "0 0 * * 0 /sbin/shutdown -r now") | sort -u | sudo crontab -
|
||||
|
||||
echo "[DSMOSS] Run the more common settings script..."
|
||||
chmod +x "more-common-settings.sh"
|
||||
./more-common-settings.sh
|
|
@ -70,3 +70,26 @@ echo "[DSMOSS] Configure file manager..."
|
|||
defaults write com.apple.finder ShowPathbar -bool true
|
||||
defaults write com.apple.finder ShowStatusBar -bool true
|
||||
killall Finder
|
||||
|
||||
|
||||
# Autokill mediaanalysisd...
|
||||
echo "[DSMOSS] Disable mediaanalysisd..."
|
||||
crontab -l | grep "@reboot killall mediaanalysisd" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Crontab entry already exists."
|
||||
else
|
||||
# Add the entry to the crontab
|
||||
echo "@reboot killall mediaanalysisd" | crontab -
|
||||
echo "Crontab entry added successfully."
|
||||
fi
|
||||
|
||||
# Add autoreboot...
|
||||
echo "[DSMOSS] Add autoreboot..."
|
||||
sudo crontab -l | grep "0 0 * * 0 /sbin/shutdown -r now" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Crontab entry already exists."
|
||||
else
|
||||
# Add the entry to the crontab
|
||||
echo "0 0 * * 0 /sbin/shutdown -r now" | sudo crontab -
|
||||
echo "Crontab entry added successfully."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue