Recent content by hal_sk

  1. hal_sk

    [Solved] Script does not run after reboot (systemd)

    It is working now. The problem was most likely "echo $(date) >>" in the script. I changed it to just "date >>" and it works now in both Mints on reboot and without errors. It was my mistake I have not much skills in shell. Thx to all.
  2. hal_sk

    [Solved] Script does not run after reboot (systemd)

    For full enclosure I have PC with 2 Linux Mints (boot selection). One of the Mint is running script fine after reboot and other Mint is not. Those paths are correct. Just the user name "hal" in paths is changed based on used OS. In next day or two I will try to test it again (for each OS) with...
  3. hal_sk

    [Solved] Script does not run after reboot (systemd)

    Well I have just tried to add "Type=oneshot" into service like this: [Unit] Description=Test service [Service] Type=oneshot ExecStart=/usr/local/bin/test.sh [Install] WantedBy=multi-user.target But did not work. And also I tried to add "/usr/bin/echo" as dcbrown73 mentioned but I don't...
  4. hal_sk

    [Solved] Script does not run after reboot (systemd)

    Hello, I have simple script /usr/local/bin/test.sh #!/bin/bash echo $(date) >> /home/hal/Desktop/log Then I have this service file: /etc/systemd/system/test.service [Unit] Description=Test service [Service] ExecStart=/usr/local/bin/test.sh [Install] WantedBy=multi-user.target Then I run...
  5. hal_sk

    Using command outputs in another scripts

    Most of above mentioned command were not know to me. Thanks. I will put them into use. And is there more reliable method to get system data in general? It would be nice if outputed data from commands: sensors or iw dev wlan0 station dump or similar... could be retrieved in JSON format, let's say...
  6. hal_sk

    [Solved] How to disable internet sharing in my access point

    The thing is solved. I have just used this tool: https://github.com/garywill/linux-router After installing it and all needed dependencies I simply use command: sudo lnxrouter -n --ap wlan0 MyAccessPoint -p MyPassPhrase Where "-n" flag means internet connection should not be shared for others...
  7. hal_sk

    Using command outputs in another scripts

    Hello, Sometime I need to extract specific value (or more values) from my system using command outputs (in order to use this values for conditional testing in scripts). For example: Get my CPU temperature and if it is above 60 °C then do something. For this scenario I use command "watch -n 2...
  8. hal_sk

    [Solved] How to disable internet sharing in my access point

    Hello, I have created wifi access point with my Raspberry Pi. I would like to stop sharing internet connection in that access point and only to allow using local network for devices connected to that AP. How can I do it? Thx.
  9. hal_sk

    Run script automatically when wifi/bluetooth detects my phone is nearby

    That's an action required from me every time I enter and leave garage. And because I am lazy I am trying to avoid it :cool: And also I just learned that phones are from privacy reasons automatically changing (spoofing?) their MAC address so it would not work. The solution might be creating...
  10. hal_sk

    Run script automatically when wifi/bluetooth detects my phone is nearby

    My garage is separate from my home location so that's no problem. The problem is how to make my raspberry to trigger my shell commands when given MAC address is in reach of my raspberry's wifi or bluetooth. I can also setup wifi access point on my raspberry (in fact I have already did) and set...
  11. hal_sk

    Run script automatically when wifi/bluetooth detects my phone is nearby

    Is there a way to do automatically run arbitrary script when Linux wireless adapter detects lets say specific MAC address of my mobile device in area? And then run other script when device is out of range? The intended use: Run my shell script that will temporary disable my Raspberry based...
  12. hal_sk

    Simple script for detecting if internet connection is working and if no then reboot

    Thank you! Will try that later. My R-Pi is in garage checking garage door closed/open status. If I encounter any issue I might show up here again later.
  13. hal_sk

    Simple script for detecting if internet connection is working and if no then reboot

    Hi, What is the most efficient way to detect (using terminal) if my internet connection is working. Returned result should be yes or no so I can use it in shell script conditioning and in case the answer is no (no internet connection) then I will command reboot. Use case: My R-Pi is connected to...
  14. hal_sk

    Linux Mint user. Linux newbie. Raspberry Pi newbie. Bitcoin friendly. Also playing with OpenHAB.

    Linux Mint user. Linux newbie. Raspberry Pi newbie. Bitcoin friendly. Also playing with OpenHAB.
Top