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

Đã hoàn thành
Đã đăng vào khoảng 3 năm trước

$10-30 USD

Thanh toán khi bàn giao
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 //-----------//
Mã dự án: 29401807

Về dự án

3 đề xuất
Dự án từ xa
Hoạt động 3 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
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 trong 2 ngày
4,8 (1 nhận xét)
1,6
1,6
3 freelancer chào giá trung bình $27 USD cho công việc này
Avatar người dùng
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 trong 1 ngày
5,0 (16 nhận xét)
3,6
3,6

Về khách hàng

Cờ của MOROCCO
Strasbourg, Morocco
5,0
2
Phương thức thanh toán đã xác thực
Thành viên từ thg 3 24, 2015

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.