이 페이지의 이전 버전을 보고 있습니다. 현재 버전 보기.

현재와 비교 페이지 이력 보기

« 이전 버전 3 다음 »


Install HTTPD

sudo yum -y install httpd

Create index.html

sudo touch /var/www/html/index.html
sudo chown kreonet:kreonet /var/www/html/index.html

Upload Script

Upload list_dhcp_clients.py on /home/kreonet/list_dhcp_clients.py

Change permission

chmod 755 /home/kreonet/list_dhcp_clients.py

Modify Script (if needed)

Check that /bin/python3 and other files are exists

list_dhcp_clients.py
#!/bin/python3
...
HOSTS='/etc/dnsmasq.d/bmc-hosts.conf'
LEASES='/var/lib/dnsmasq/bmc.leases'
ISO_DIR='/ISOs'
OUT='/var/www/html/index.html'
...


Register script via crontab

crontab -e

# add the following
*/5 * * * * /home/kreonet/list_dhcp_clients.py

Access to webpage

  • 레이블 없음