mirror of https://github.com/Revertron/Alfis
Added and updated some configs.
parent
640e2a0619
commit
9b6a6f1718
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is the "Service" file for ALFIS in OPKG environment
|
||||
# Usually lives in /opt/etc/init.d/ directory
|
||||
|
||||
ENABLED=yes
|
||||
PROCS=alfis
|
||||
ARGS="-d -c /opt/etc/alfis.conf -w /opt/var/lib/alfis/ -l /opt/var/log/alfis.log"
|
||||
PREARGS=""
|
||||
DESC=$PROCS
|
||||
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
. /opt/etc/init.d/rc.func
|
@ -0,0 +1,21 @@
|
||||
#!/opt/bin/bash
|
||||
|
||||
# ALFIS upgrade script for Keenetic routers with Entware
|
||||
|
||||
json=$(curl -s "https://api.github.com/repos/Revertron/Alfis/releases/latest")
|
||||
upstreamver=$(echo "$json" | jq -r ".tag_name")
|
||||
|
||||
curver=$(alfis -v | cut -c7-25)
|
||||
|
||||
changed=$(diff <(echo "$curver") <(echo "$upstreamver"))
|
||||
|
||||
if [ "$changed" != "" ]
|
||||
then
|
||||
echo "Upgrading from $curver to $upstreamver"
|
||||
/opt/etc/init.d/S98alfis stop
|
||||
wget https://github.com/Revertron/Alfis/releases/download/$upstreamver/alfis-linux-mipsel-$upstreamver-nogui -O /opt/bin/alfis
|
||||
chmod +x /opt/bin/alfis
|
||||
/opt/etc/init.d/S98alfis start
|
||||
else
|
||||
echo "No need to upgrade, $curver is the current version"
|
||||
fi
|
Loading…
Reference in New Issue