Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a few bots so create script to apply your patches #1

Closed
s3frank opened this issue Jan 11, 2020 · 3 comments
Closed

I have a few bots so create script to apply your patches #1

s3frank opened this issue Jan 11, 2020 · 3 comments

Comments

@s3frank
Copy link

s3frank commented Jan 11, 2020

#!/bin/bash
##
# Stop Cron service and Watchdog
echo "Stopping Cron and Watchdog services..."
service rrwatchdoge stop
service cron stop 

# Copy all the files and overwrite
echo "Copying patched files into place..."
yes | cp -rf patch/. /.

# Make sure things are executable
echo "Setting execution flag on scripts..."
chmod +x /opt/rockrobo/rrlog/logclean.sh
chmod +x /root/check_all
chmod +x /root/check_reboot
chmod +x /usr/bin/logrotate.sh

# Restart all services, sleep for 2 minutes and then issue a reboot
echo "Starting Cron and Watchdog again..."
service cron start
sleep 10 
service rrwatchdoge start

echo "Rebooting in 30 seconds..."
sleep 30
reboot

This assumes that all the files you currently have in your repo end up in sub directory called patch and the script (apply_patch.sh in my case) is executed in the working directory.

@MadJoker0815
Copy link
Owner

I'm thinking about a install script doing all work.
I think is this would be the easiest way.

@MadJoker0815
Copy link
Owner

MadJoker0815 commented Jan 21, 2020

I added a install.sh script, this should be able to make the modifications.
Just load this onto the system and execute it via "sh install.sh" It does not matter where the script is located.

https://github.com/MadJoker0815/roborock_nologs/blob/master/install.sh

@s3frank
Copy link
Author

s3frank commented Jan 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants