소스 검색

Daemon install script: added sudo to systemctl tasks

Christian Kahlau 3 년 전
부모
커밋
2172d4d63c
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      daemon/install/install.sh

+ 3 - 3
daemon/install/install.sh

@@ -70,7 +70,7 @@ if [ ! -f "$SVC_FILE" ]; then
   ACTION="install"
 fi
 
-cat > $SVC_FILE << EOF
+sudo cat > $SVC_FILE << EOF
 [Unit]
 Description=HostBBQ Monitoring Daemon Service
 After=network.target
@@ -87,9 +87,9 @@ Alias=monitoring@daemon.service
 EOF
 
 if [[ "$ACTION" = "install" ]]; then
-  systemctl enable monitoring@daemon.service
+  sudo systemctl enable monitoring@daemon.service
 else
-  systemctl restart monitoring@daemon.service
+  sudo systemctl restart monitoring@daemon.service
 fi
 
 echo "[CLEANUP] Removing temp folder $TMPFOLDER"