智慧型手機用Wi-Fi連上MoodleBox網路,開啟Moodle行動應用程式(APP),用URL http://moodlebox.home 連上到平台,用管理員帳號登入。應該沒有任何錯誤回報,且在智慧型手機螢幕上顯示「沒有課程訊息可顯示」。
為了讓MoodleBox的動新啟動及關機時,不造成MiscroSD卡損壞的風險,可以更改密碼、設定時間、改變Wi-Fi網路的密碼,以及在操作中提供有用的訊息,我們在MoodleBox上安裝管理Moodle的外掛。
$ cd /var/www/html/admin/tool/
$ sudo git clone https://github.com/martignoni/moodlebox-plugin.git moodlebox
$ cd /var/www/html/admin/tool/moodlebox
$ sudo touch .reboot-server; touch .shutdown-server; touch .set-server-datetime; touch .newpassword; touch .wifipassword
$ sudo chown -R www-data:www-data /var/www/html/admin/tool/moodlebox
$ sudo apt-get install incron
$ echo root | sudo tee -a /etc/incron.allow
$ sudo incrontab -e
/var/www/html/admin/tool/moodlebox/.reboot-server IN_CLOSE_WRITE /sbin/shutdown –r now
/var/www/html/admin/tool/moodlebox/.shutdown-server IN_CLOSE_WRITE /sbin/shutdown -h now
/var/www/html/admin/tool/moodlebox/.set-server-datetime IN_MODIFY /bin/bash /var/www/html/admin/tool/moodlebox/.set-server-datetime
/var/www/html/admin/tool/moodlebox/.newpassword IN_CLOSE_WRITE /bin/bash /var/www/html/admin/tool/moodlebox/bin/changepassword.sh
/var/www/html/admin/tool/moodlebox/.wifipassword IN_CLOSE_WRITE /bin/bash /var/www/html/admin/tool/moodlebox/bin/setwifipassword.sh