Skip to content

Commit

Permalink
nc-ramlog: adapt to armbian
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Jan 15, 2019
1 parent be9a546 commit 389ed0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
23 changes: 5 additions & 18 deletions bin/ncp/SYSTEM/nc-ramlogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,7 @@

is_active()
{
systemctl -q is-active log2ram &>/dev/null
}

find_unit_name()
{
UNIT_NAME=""
entry=$(systemctl list-unit-files --no-pager | grep -e ramlog)
if [[ -z "$entry" ]]
then
UNIT_NAME=""
elif [[ $entry == *armbian-ramlog* ]]
then
UNIT_NAME=armbian-ramlog
else
UNIT_NAME=log2ram
fi
systemctl -q is-active log2ram &>/dev/null || systemctl -q is-active armbian-ramlog &>/dev/null
}

install()
Expand All @@ -53,8 +38,10 @@ configure()
echo "Logs in SD. Reboot to take effect"
return
}
systemctl enable "$UNIT_NAME"
systemctl start "$UNIT_NAME"

[[ -f /lib/systemd/system/armbian-ramlog.service ]] && local ramlog=armbian-ramlog || local ramlog=log2ram
systemctl enable "$ramlog"
systemctl start "$ramlog"

echo "Logs in RAM. Reboot to take effect"
}
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v1.3.2](https://github.com/nextcloud/nextcloudpi/commit/86c5bef) (2019-01-14) nc-automount: fix description
[v1.3.3](https://github.com/nextcloud/nextcloudpi/commit/f53bfd2) (2019-01-14) nc-ramlog: adapt to armbian

[v1.3.2](https://github.com/nextcloud/nextcloudpi/commit/be9a546) (2019-01-14) nc-automount: fix description

[v1.3.1 ](https://github.com/nextcloud/nextcloudpi/commit/61e3ff3) (2019-01-13) ncp-update: fail if version cant be parsed

Expand Down

0 comments on commit 389ed0c

Please sign in to comment.