Find Jobs
Hire Freelancers

Bash / Shell Script: correct / debug Shell script to wake up screen at 7am, launch Chromium, and sleep screen at 7pm

$10-30 USD

Completed
Posted about 3 years ago

$10-30 USD

Paid on delivery
Hi, I have a few Shell scripts, I want to run automatically on a Raspberry Pi, Here is how it goes: 1. The Crontab part should launch the [login to view URL] script and schedule [login to view URL] at 7am, and [login to view URL] at 7pm 2. [login to view URL] should launch [login to view URL] if a reboot happens between 7am and 7pm; BUT if the reboot happens 7pm and 7am (the opposite),... then it should run [login to view URL] 3. [login to view URL] should wake up screen, launch chromium-browser... launch [login to view URL] script, etc. See below 4. [login to view URL] (see below) WHAT TO DO: this is not working and I have no time to debug / correct, if you can do it, please let me know. Please also test it on your side, if it works then your job is done. CRONTAB: @reboot sleep 30 && /home/pi/Desktop/[login to view URL] 0 7 * * * DISPLAY=:0 /home/pi/Desktop/[login to view URL] 0 19 * * * DISPLAY=:0 /home/pi/Desktop/[login to view URL] THE [login to view URL] FILE //-----------// export DISPLAY=:0 # if 7 > time < 19, run [login to view URL] currenttime=$(date +%H:%M) if [[ "$currenttime" > "07:00" ]] && [[ "$currenttime" < "19:00" ]]; then do sleep 15 && /home/pi/Desktop/[login to view URL] else do sleep 15 && /home/pi/Desktop/[login to view URL] fi done //-----------// THE [login to view URL] FILE //-----------// export DISPLAY=:0 # finish evening pkill -f evening # wake up screen at 7am, sleep at 7pm xset dpms force on sleep 5 && chromium-browser --kiosk --disable-restore-session-state "https://analytics.google.com/analytics/web/#/report/trafficsources-all-traffic/a26460474w51176098p51852097/_u.dateOption=last30days&_.goalOption=6" # tab switching with xdotool pkill -f keystrokes sleep 60 && /home/pi/Desktop/[login to view URL] # set xset prefs every 5mins (so it never fails) while (true) do xset dpms 0 0 0 xset s 0 0 sleep 300 done //-----------// THE [login to view URL] FILE //-----------// export DISPLAY=:0 # finish morning process pkill -f morning # stop keystrokes pkill -f keystrokes # close chromium pkill -f chromium # set screen auto-sleep: 10min xset dpms 600 600 600 xset s 600 600 # sleep screen pm xset dpms force off //-----------// THE [login to view URL] FILE //-----------// export DISPLAY=:0 while (true) do xdotool keydown ctrl+Tab; xdotool keyup ctrl+Tab sleep 60 done //-----------//
Project ID: 29401807

About the project

3 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello sir, I am more than 25 year linux admin. I will correct, test this script. I will add log or mail service on errors, if you use it. Josef
$15 USD in 2 days
4.8 (1 review)
1.6
1.6
3 freelancers are bidding on average $27 USD for this job
User Avatar
Hello ! Im experienced sysadmin with almost 3 years of experience i can get this done exactly as needed. If you are interested please feel free to contact me. Thank you ! Best regards,
$35 USD in 1 day
5.0 (16 reviews)
3.6
3.6

About the client

Flag of MOROCCO
Strasbourg, Morocco
5.0
2
Payment method verified
Member since Mar 24, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.