Skip to content

Commit

Permalink
Very minor changes to shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Spanti (RyDroid) authored and mehdilauters committed Dec 11, 2016
1 parent b1df2c4 commit 83123de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions service.sh
@@ -1,11 +1,12 @@
#!/bin/bash

SCRIPT_PATH="${BASH_SOURCE[0]}";
cd `dirname $SCRIPT_PATH`

while true; do
python scanmap.py $@ >>/tmp/wifimap.log 2>&1
python scanmap.py "$@" >>/tmp/wifimap.log 2>&1
echo "============="
date >> /tmp/wifimap.log
kill -9 `cat /var/run/wifimap`
kill -9 `cat /var/run/wifimap-airodump`
done
done
9 changes: 5 additions & 4 deletions wifimap_service.sh
@@ -1,4 +1,5 @@
#! /bin/bash

### BEGIN INIT INFO
# Provides: wifimap.sh
# Required-Start: gpsd
Expand All @@ -20,15 +21,15 @@ PIDFILE=/var/lock/wifimap.pid
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting script wifimap "
echo 'Starting script wifimap'
start-stop-daemon -b --start --exec path/to/service.sh
;;
stop)
echo "Stopping script blah"
echo "Could do more here"
echo 'Stopping script blah'
echo 'Could do more here'
;;
*)
echo "Usage: /etc/init.d/blah {start|stop}"
echo 'Usage: /etc/init.d/blah {start|stop}'
exit 1
;;
esac
Expand Down

0 comments on commit 83123de

Please sign in to comment.