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

Complété
Publié il y a environ 3 ans

$10-30 USD

Payé lors de la livraison
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 //-----------//
N° de projet : 29401807

Concernant le projet

3 propositions
Projet à distance
Actif à il y a 3 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
Décerné à :
Avatar de l'utilisateur
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 en 2 jours
4,8 (1 commentaire)
1,6
1,6
3 freelances proposent en moyenne $27 USD pour ce travail
Avatar de l'utilisateur
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 en 1 jour
5,0 (16 commentaires)
3,6
3,6

À propos du client

Drapeau de MOROCCO
Strasbourg, Morocco
5,0
2
Méthode de paiement vérifiée
Membre depuis mars 24, 2015

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.