|
@@ -46,8 +46,91 @@ and restart the ArozOS system.
|
|
|
|
|
|
## Subservice
|
|
## Subservice
|
|
|
|
|
|
-Subservice in ArozOS are executables that require compilation on install. Subservices are mostly installed by the OEM manufacturer or Makers with technical backgrounds. Subservice installation can only be done via the host system shell (or ssh / terminal, depends on what you prefer to call it) and reboot of the system is required to make the installation effective.
|
|
|
|
|
|
+Subservice in ArozOS are executables that require compilation on install. **Subservices are mostly installed by the OEM manufacturer or Makers with technical backgrounds.** Subservice installation can only be done via the host system shell (or ssh / terminal, depends on what you prefer to call it) and reboot of the system is required to make the installation effective.
|
|
|
|
|
|
ArozOS Subservice can access the system OS directly as it is executed as a "process" in the OS level. Subservice can also access ArozOS core functions using AGI interface with request tokens. In most case, subservice contains platform dependent codes and sometime also architecture dependent codes (e.g. ARM vs amd64).
|
|
ArozOS Subservice can access the system OS directly as it is executed as a "process" in the OS level. Subservice can also access ArozOS core functions using AGI interface with request tokens. In most case, subservice contains platform dependent codes and sometime also architecture dependent codes (e.g. ARM vs amd64).
|
|
|
|
|
|
-You can find all your installed Subservices under ./subservice folder inside your ArozOS root folder.
|
|
|
|
|
|
+You can find all your installed Subservices under ./subservice folder inside your ArozOS root folder.
|
|
|
|
+
|
|
|
|
+### Installation of Subservice
|
|
|
|
+
|
|
|
|
+To install subservice onto your ArozOS, connect to your host with terminal / ssh and pull your git repo into ./subservice. Here is an example command of installing ArSamba subservice with assuming your ArozOS root is at ~/arozos
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+cd ~/arozos/subservice
|
|
|
|
+git clone https://github.com/aroz-online/ArSamba
|
|
|
|
+
|
|
|
|
+# Wait for the clone to be completed
|
|
|
|
+cd ArSamba
|
|
|
|
+./build.sh
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+The binary executable must follow a rule that the built binary must match the platform prefix. here is an example of the build file.
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+# /bin/sh
|
|
|
|
+echo "Building darwin"
|
|
|
|
+GOOS=darwin GOARCH=amd64 go build
|
|
|
|
+mv "${PWD##*/}" "${PWD##*/}_darwin_amd64"
|
|
|
|
+
|
|
|
|
+echo "Building linux"
|
|
|
|
+GOOS=linux GOARCH=amd64 go build
|
|
|
|
+mv "${PWD##*/}" "${PWD##*/}_linux_amd64"
|
|
|
|
+GOOS=linux GOARCH=arm go build
|
|
|
|
+mv "${PWD##*/}" "${PWD##*/}_linux_arm"
|
|
|
|
+GOOS=linux GOARCH=arm64 go build
|
|
|
|
+mv "${PWD##*/}" "${PWD##*/}_linux_arm64"
|
|
|
|
+
|
|
|
|
+echo "Building windows"
|
|
|
|
+GOOS=windows GOARCH=amd64 go build
|
|
|
|
+
|
|
|
|
+echo "Completed"
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+If your subservice do not support some of the platform, just comment out the build command for that platform.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+To activate the subservice, restart your ArozOS service using:
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+sudo systemctl restart arozos.service
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+### Remove of Subservice
|
|
|
|
+
|
|
|
|
+To remove subservice, stop the arozos service and remove the subservice folder from the subservice root folder. Here is an example of removing a subservice named "MySubservice"
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+sudo systemctl stop arozos
|
|
|
|
+cd ~/arozos/subservice/
|
|
|
|
+rm -rf ./MySubservice
|
|
|
|
+sudo systemctl start arozos
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+### Enabling / Disabling Subservice
|
|
|
|
+
|
|
|
|
+To enable or disable a subservice, visit System Setting > Subservice tab and select a service to start / disabled.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+### Manually Display Subservice
|
|
|
|
+
|
|
|
|
+if you want to disable a subservice during startup, add a file named ".disabled" in the subservice module root folder. Here is an example
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+cd ~/arozos/subservice/MySubservice
|
|
|
|
+touch .disabled
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+After restart of your ArozOS system, you will see the module listed in the "Disabled Service" list.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|