Add installer
This commit is contained in:
parent
b57bdf1358
commit
dd41b687e5
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"textbelt_key": "",
|
"textbelt_key": "API_KEY",
|
||||||
"data": "http://localhost/tar1090/data/aircraft.json",
|
"data": "http://localhost/tar1090/data/aircraft.json",
|
||||||
"tracker": "https://globe.theairtraffic.com/",
|
"tracker": "https://globe.theairtraffic.com/",
|
||||||
"database": "subscriptions.db",
|
"database": "subscriptions.db",
|
||||||
|
|
24
installer.sh
Executable file
24
installer.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
useradd --system --shell /bin/false --home /var/lib/adsms adsms
|
||||||
|
|
||||||
|
mkdir -p /var/lib/adsms
|
||||||
|
chown adsms:adsms /var/lib/adsms
|
||||||
|
chmod 775 /var/lib/adsms
|
||||||
|
|
||||||
|
touch /var/lib/adsms/subscribers.db
|
||||||
|
chown adsms:adsms /var/lib/adsms/subscribers.db
|
||||||
|
chmod 660 /var/lib/adsms/subscribers.db
|
||||||
|
|
||||||
|
cp -n example_config.json /etc/adsms.json
|
||||||
|
chown root:adsms /etc/adsms.json
|
||||||
|
chmod 640 /etc/adsms.json
|
||||||
|
|
||||||
|
cp -f adsms.py /usr/local/bin/adsms
|
||||||
|
chown root:root /usr/local/bin/adsms
|
||||||
|
chmod 755 /usr/local/bin/adsms
|
Loading…
Reference in New Issue
Block a user