https://github.com/michdo93/python-web-remote-control
A web-based remote control via WoL and SSH in python,
https://github.com/michdo93/python-web-remote-control
Last synced: 2 months ago
JSON representation
A web-based remote control via WoL and SSH in python,
- Host: GitHub
- URL: https://github.com/michdo93/python-web-remote-control
- Owner: Michdo93
- Created: 2023-12-12T13:07:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T14:06:51.000Z (over 2 years ago)
- Last Synced: 2025-03-04T00:45:25.623Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-web-remote-control
A web-based remote control via WoL and SSH in python.
## Installation
At first you have to install following:
```
pip install wakeonlan
pip install http.server
sudo apt update
sudo apt install sshpass -y
```
Then you have to download the script and make it executable:
```
cd /opt
wget https://raw.githubusercontent.com/Michdo93/python-web-remote-control/main/handler.py
chmod +x handler.py
```
Then you have to create a service with `sudo nano /etc/systemd/system/web_remote_handler.service`:
```
[Unit]
Description=Web Remote Handler
After=network-online.target
[Service]
Type=simple
User=
Group=
UMask=002
WorkingDirectory=/opt
ExecStart=/usr/bin/python3 /opt/handler.py
Restart=on-failure
RestartSec=30s
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=web-remote-handler
[Install]
WantedBy=multi-user.target
```
You can then start and enable the service with:
```
sudo systemctl start web-remote-handler
sudo systemctl enable web-remote-handler
```
## Customization
You can change the following lines:
```
instances = [
WoLHandler('192.168.1.100', '00:11:22:33:44:55', 'user1', 'password1'),
WoLHandler('192.168.1.101', '00:11:22:33:44:56', 'user2', 'password2'),
# Add more instances as needed
]
```