Skip to content

Commit

Permalink
Fixed user and group owner of the services and add the absolut path t…
Browse files Browse the repository at this point in the history
…o the logging.conf file.
  • Loading branch information
inonoob committed Feb 15, 2021
1 parent 69850a5 commit a729291
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ sed -i 's@#PYTHON3#@'"$python3_path"'@g' supervisord.conf
sed -i 's@#REPO_DIR#@'"$repo_dir"'@g' supervisord.conf
#sudo sed -i -e '$i \su '"${USER}"' -c '\''nohup '"${supervisord_path}"' -c '"${repo_dir}"'/supervisord.conf'\''\n' /etc/rc.local
sudo mv supervisord.service /etc/systemd/system/
sudo chmod 640 /etc/systemd/system/supervisord.service
sudo chown root:root /etc/systemd/system/supervisord.service
sudo chmod 655 /etc/systemd/system/supervisord.service
sudo systemctl enable supervisord

echo " "
Expand All @@ -115,7 +116,8 @@ echo " "
#
#sudo sed -i -e '$i \'"${repo_dir}"'/update-bt-cfg.sh''\n' /etc/rc.local # Update to respect iOS bluetooth specifications
sudo mv update-bt-cfg.service /etc/systemd/system/
sudo chmod 640 /etc/systemd/system/update-bt-cfg.service
sudo chown root:root /etc/systemd/system/update-bt-cfg.service
sudo chmod 655 /etc/systemd/system/update-bt-cfg.service
sudo systemctl enable update-bt-cfg


Expand Down
5 changes: 4 additions & 1 deletion src/waterrowerthreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@
import wrtobleant
import waterrowerant
import smartrowtobleant
import pathlib

loggerconfigpath = str(pathlib.Path(__file__).parent.absolute()) +'/' +'logging.conf'

logger = logging.getLogger(__name__)

def main(args=None):
logging.config.fileConfig('/home/pi/pirowflo/src/logging.conf', disable_existing_loggers=False)
logging.config.fileConfig(loggerconfigpath, disable_existing_loggers=False)

def BleService(out_q, ble_in_q):
logger.info("Start BLE Advertise and BLE GATT Server")
Expand Down

0 comments on commit a729291

Please sign in to comment.