Skip to content

Commit c2b3233

Browse files
committed
service start/stop tweaks
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 parent b786fca commit c2b3233

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

functions/grott-install.bash

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ install_grott() {
6969
fi
7070

7171
# Enable and start service
72-
sudo systemctl daemon-reexec
73-
sudo systemctl enable grott
74-
sudo systemctl start grott
72+
sudo systemctl enable grott --now
73+
sudo systemctl daemon-reload
7574

7675
if [[ -n "$INTERACTIVE" ]]; then
7776
whiptail --title "Grott Proxy installed" --msgbox "We installed Grott Proxy on your system." 7 80

functions/grott-install.bats

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ setup_file() {
99

1010
teardown_file() {
1111
unset BASEDIR
12-
# Stop grott.service
13-
systemctl kill grott.service || true
12+
# Stop grott service
13+
systemctl kill grott || true
1414
}
1515

1616
@test "destructive-grott_install" {
@@ -21,13 +21,13 @@ teardown_file() {
2121
[ "$status" -eq 0 ]
2222
echo -e "# ${COL_GREEN}$(timestamp) [openHABian] Grott Proxy installation successful.${COL_DEF}" >&3
2323

24-
# Wait for grott.service start
24+
# Await grott service
2525
sleep 5s
2626

27-
## Check grott.service is running
27+
## Check grott service is running
2828
echo -e "# ${COL_CYAN}$(timestamp) [openHABian] Checking if Grott Proxy service is running...${COL_DEF}" >&3
29-
run systemctl is-active --quiet grott.service
30-
if [ "$status" -ne 0 ]; then systemctl status grott.service; fi
29+
run systemctl is-active --quiet grott
30+
if [ "$status" -ne 0 ]; then echo "$output" >&3; fi
3131
[ "$status" -eq 0 ]
3232
echo -e "# ${COL_GREEN}$(timestamp) [openHABian] Grott Proxy service is running.${COL_DEF}" >&3
3333
}

0 commit comments

Comments
 (0)