Переглянути джерело

Daemon install script: exec all with sudo

Christian Kahlau 3 роки тому
батько
коміт
1c33f00ecc
2 змінених файлів з 4 додано та 4 видалено
  1. 1 1
      Readme.md
  2. 3 3
      daemon/install/install.sh

+ 1 - 1
Readme.md

@@ -5,7 +5,7 @@
 ### Install
 
 ```bash
-curl -fsSL https://gogs.hostbbq.com/hostbbq/hostbbq-monitoring/raw/master/daemon/install/install.sh | bash -
+curl -fsSL https://gogs.hostbbq.com/hostbbq/hostbbq-monitoring/raw/master/daemon/install/install.sh | sudo -E bash -
 ```
 
 ## Monitoring Server & Web UI

+ 3 - 3
daemon/install/install.sh

@@ -70,7 +70,7 @@ if [ ! -f "$SVC_FILE" ]; then
   ACTION="install"
 fi
 
-sudo cat > $SVC_FILE << EOF
+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
-  sudo systemctl enable monitoring@daemon.service
+  systemctl enable monitoring@daemon.service
 else
-  sudo systemctl restart monitoring@daemon.service
+  systemctl restart monitoring@daemon.service
 fi
 
 echo "[CLEANUP] Removing temp folder $TMPFOLDER"