ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်
ဒီ practice set က difficulty ပိုမြင့်ပါတယ် — SSH remote setup, systemd service, web dashboard concept တွေကို တစ်ခါတည်း ပေါင်းသုံးရမယ့် task များပါ။
လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
Task ၂ ခု — (1) Auto-Start Web Dashboard: 'Setting Up a Web Server on Pi' lesson ရဲ့ Flask app ကို 'Running Services on Boot' lesson ရဲ့ systemd pattern ဖြင့် boot-on-start service အဖြစ် ပြောင်းရေးကြည့်ပါ (service file ရေး, enable, Pi restart ပြီးလည်း dashboard auto-run ဖြစ်ကြောင်း confirm), (2) Remote Backup Script: temp_log.csv ဖိုင်ကို ပုံမှန် (daily) computer ဆီ rsync ဖြင့် backup ယူတဲ့ shell script ရေးပြီး, Linux tutorial ရဲ့ cron lesson ကို ပြန်ကြည့်ပြီး daily schedule ချကြည့်ပါ။
အတူတူ ကြည့်မယ်
# Task 2 hint — cron entry for daily backup at 2am
# crontab -e ထဲမှာ ထည့်ရမယ့် line:
0 2 * * * rsync -avz /home/pi/temp_log.csv user@backup-computer:/backups/Task ၂ ခုစလုံးအတွက် Pi restart ပြီးလည်း automatic ဆက်အလုပ်ဖြစ်နေတဲ့ system ကို ပြီးမြောက်မည်။၅ မိနစ် စမ်းကြည့်
Task ၂ ခုကို ကိုယ်တိုင် implement လုပ်ကြည့်ပါ — Linux tutorial ရဲ့ systemd/cron lesson ၂ ခုကို reference အဖြစ် ပြန်ဖွင့်ကြည့်ပါ။
သတိလေးတစ်ချက်
Cron job ကို run ခင် terminal မှာ ကိုယ်တိုင် test run လုပ်ပြီးမှ crontab ထဲ ထည့်ပါ — Linux tutorial ရဲ့ cron warning အတိုင်း cron environment က terminal environment နဲ့ variable ကွာနိုင်ပါတယ်။