Skip to content

Commit

Permalink
Updated systemd unit file to wait on network-online.target (cf. uhppo…
Browse files Browse the repository at this point in the history
  • Loading branch information
twystd committed Dec 6, 2022
1 parent 8fad1c7 commit d560b83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## [Unreleased]

### Changed
1. Updated _systemd_ unit file to wait on `network-online.target`


## [0.8.2](https://github.com/uhppoted/uhppoted-rest/releases/tag/v0.8.2) - 2022-10-14

### Changed
Expand Down
7 changes: 6 additions & 1 deletion commands/daemonize_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ type info struct {
const serviceTemplate = `[Unit]
Description={{.Description}}
Documentation={{.Documentation}}
After=syslog.target network.target
After=syslog.target network-online.target
Wants=syslog.target network-online.target
[Service]
Type=simple
Expand Down Expand Up @@ -182,6 +183,10 @@ func (cmd *Daemonize) Execute(args ...interface{}) error {
fmt.Printf(" > sudo systemctl start %s", SERVICE)
fmt.Printf(" > sudo systemctl status %s", SERVICE)
fmt.Println()
fmt.Println(" For some system configurations it may be necessary to also enable the service:")
fmt.Println()
fmt.Printf(" > sudo systemctl enable %v\n", SERVICE)
fmt.Println()
fmt.Println(" The firewall may need additional rules to allow UDP broadcast e.g. for UFW:")
fmt.Println()
fmt.Printf(" > sudo ufw allow from %s to any port 60000 proto udp\n", d.BindAddress.IP)
Expand Down

0 comments on commit d560b83

Please sign in to comment.