Setelah menambahkan fungsi baru di app.go, Anda perlu regenerate bindings Wails:
# Development mode (akan auto-generate bindings)
wails dev
# Atau manual generate
wails generate module- Apache:
apache2 - MySQL:
mysql
- Apache:
httpd - MySQL:
mysql
Untuk Linux, Anda mungkin perlu menambahkan user ke sudoers atau memberikan permission:
# Tambahkan user ke sudo group
sudo usermod -aG sudo $USER
# Atau edit sudoers untuk allow tanpa password (DEVELOPMENT ONLY!)
sudo visudo
# Tambahkan: your_username ALL=(ALL) NOPASSWD: /bin/systemctl- Build aplikasi:
wails build- Jalankan aplikasi:
./build/bin/LocalValet-dev-linux-amd64- ✅
GetServiceStatus(serviceName string)- Check if service is running - ✅
StartService(serviceName string)- Start a service - ✅
StopService(serviceName string)- Stop a service - ✅
ToggleService(serviceName, shouldStart)- Toggle service on/off - ✅ Cross-platform support (Linux, macOS, Windows)
- ✅ Service management UI with switches
- ✅ Real-time status checking (every 5 seconds)
- ✅ Loading states during operations
- ✅ Integrated logging system
- ✅ Color-coded log levels (info, success, warning, error)
- ✅ Auto-scroll logs
- ✅ Clear logs button
The app supports managing these services:
- Apache - Web server
- MySQL - Database server
You can easily add more services by updating the modules state in App.tsx.
Run wails dev or wails generate module to regenerate TypeScript bindings.
Make sure your user has sudo permissions for systemctl commands.
Check logs in the UI for specific error messages. Check service status manually:
# Linux
sudo systemctl status apache2
sudo systemctl status mysql
# macOS
brew services list