blob: 1e29f1fb26f2dc7a669df4b9cba7c1886151e7ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
##Create oscleash config user dir
if [ ! -d "$HOME/.config/OSCLeash" ];
then
mkdir -p $HOME/.config/OSCLeash
fi
##check if the user config is there
if [ ! -f "$HOME/.config/OSCLeash/Config.json" ];
then
cp /opt/OSCLeash/Config.json.example $HOME/.config/OSCLeash/Config.json
fi
##check if the symlink is attached to the current user running this script
confSym=$(ls -la | grep "$HOME")
if [ -z "$confSym" ];
then
if [ -f "/opt/OSCLeash/Config.json" ];
then
rm -f /opt/OSCLeash/Config.json
fi
ln -s $HOME/.config/OSCLeash/Config.json /opt/OSCLeash/
fi
cd /opt/OSCLeash
/usr/bin/python /opt/OSCLeash/OSCLeash.py
|