您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

18 行
516 B

  1. #!/bin/bash
  2. BASEPATH=/opt
  3. INSTALLPATH=$BASEPATH/MQTTnetServer
  4. # Check if systemctl exists, does not exist in docker containers
  5. SCTL=$(which systemctl >/dev/null; echo $?)
  6. if [ "$SCTL" -eq "0" ]; then
  7. # Stop service before uninstalling
  8. systemctl stop mqttnet-server
  9. fi
  10. # Check if setcap exists, does not exist in docker containers
  11. SCAP=$(which setcap >/dev/null; echo $?)
  12. if [ "$SCAP" -eq "0" ]; then
  13. # Remove permission to open ports
  14. setcap CAP_NET_BIND_SERVICE=-eip $INSTALLPATH/MQTTnet.Server
  15. fi