Skip to content

Commit

Permalink
Merge pull request #804 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
arccontrol: add new
  • Loading branch information
AuxXxilium authored Dec 15, 2024
2 parents d906cdf + 855dac6 commit 6431d4e
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
Binary file added arccontrol/all/usr/arc/addons/arc-control.spk
Binary file not shown.
26 changes: 26 additions & 0 deletions arccontrol/all/usr/bin/arccontrol.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#

APPVESION="1.1-14"
VERSION="$(cat /var/packages/arc-control/INFO | grep "version" | cut -d '"' -f 2)"
if [ ! -d "/var/packages/arc-control" ] || [ "${VERSION}" != "${APPVERSION}" ]; then
# Install Arc Control
synopkg install /usr/arc/addons/arc-control.spk
if [ $? -ne 0 ]; then
echo "Arc Control: Installation failed!"
exit 1
fi
# Set permissions
/var/packages/arc-control/target/app/install.sh
if [ $? -ne 0 ]; then
echo "Arc Control: Failed to set permissions!"
exit 1
fi
# Start Arc Control
synopkg restart arc-control
fi
37 changes: 37 additions & 0 deletions arccontrol/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env ash
#
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#

if [ "${1}" = "late" ]; then
echo "Installing addon arccontrol - ${1}"
mkdir -p "/tmpRoot/usr/arc/addons/"
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"

cp -pf /usr/bin/arccontrol.sh /tmpRoot/usr/bin/arccontrol.sh
cp -pf /usr/arc/addons/arc-control.spk /tmpRoot/usr/arc/addons/arc-control.spk

mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/arccontrol.service"
{
echo "[Unit]"
echo "Description=addon arccontrol"
echo "After=multi-user.target"
echo
echo "[Service]"
echo "Type=oneshot"
echo "RemainAfterExit=yes"
echo "ExecStart=/usr/bin/arccontrol.sh"
echo
echo "[Install]"
echo "WantedBy=multi-user.target"
} >"${DEST}"
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
ln -vsf /usr/lib/systemd/system/arccontrol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arccontrol.service
elif [ "${1}" = "uninstall" ]; then
echo "Installing addon arccontrol - ${1}"
# To-Do
fi
20 changes: 20 additions & 0 deletions arccontrol/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 1
name: arccontrol
description: "Arc Control - System Monitoring Tool"
system: false
beta: true
target: app
all:
install-script: "install.sh"
copy: "all"
apollolake: true
broadwell: true
broadwellnk: true
broadwellnkv2: true
broadwellntbap: true
denverton: true
geminilake: true
purley: true
v1000: true
r1000: true
epyc7002: true

0 comments on commit 6431d4e

Please sign in to comment.