2024-08-18 02:13:35 +07:00
|
|
|
#!/usr/bin/env ash
|
2024-08-31 22:36:41 +07:00
|
|
|
#
|
2024-10-05 23:07:45 +07:00
|
|
|
# Copyright (C) 2024 AuxXxilium <https://github.com/AuxXxilium>
|
2024-08-31 22:36:41 +07:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the MIT License.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
2024-08-18 02:13:35 +07:00
|
|
|
if [ "${1}" = "late" ]; then
|
2024-08-19 05:03:13 +07:00
|
|
|
echo "Installing addon sspatch - ${1}"
|
|
|
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
|
|
|
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
|
|
|
|
2024-09-01 02:21:38 +07:00
|
|
|
cp -vf "/usr/bin/sspatch.sh" "/tmpRoot/usr/bin/sspatch.sh"
|
2024-11-01 17:44:27 +07:00
|
|
|
|
|
|
|
cp -vf "/usr/lib/sspatch.tgz" "/tmpRoot/usr/arc/sspatch.tgz"
|
|
|
|
cp -vf "/usr/lib/sspatch-openvino.tgz" "/tmpRoot/usr/arc/sspatch-openvino.tgz"
|
|
|
|
cp -vf "/usr/lib/sspatch-3221.tgz" "/tmpRoot/usr/arc/sspatch-3221.tgz"
|
2024-09-01 02:21:38 +07:00
|
|
|
|
|
|
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
|
|
|
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
2024-09-19 22:26:10 +07:00
|
|
|
cat <<EOF >${DEST}
|
2024-09-01 02:21:38 +07:00
|
|
|
[Unit]
|
|
|
|
Description=addon sspatch
|
2024-10-05 23:07:45 +07:00
|
|
|
After=multi-user.target
|
2024-09-01 02:21:38 +07:00
|
|
|
|
|
|
|
[Service]
|
2024-10-06 04:11:18 +07:00
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=yes
|
2024-09-01 02:21:38 +07:00
|
|
|
ExecStart=/usr/bin/sspatch.sh
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
EOF
|
|
|
|
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
|
|
|
ln -vsf /usr/lib/systemd/system/sspatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sspatch.service
|
2024-08-18 02:13:35 +07:00
|
|
|
elif [ "${1}" = "uninstall" ]; then
|
|
|
|
echo "Installing addon sspatch - ${1}"
|
|
|
|
# To-Do
|
|
|
|
fi
|