Well, hello again.
Im still there, and i'm working on it. Main language i chosen is Swift. Also i used for a help SwiftShell framework. Everything is good to go, i can now monitor status of pools, etc.. but faced a problems with escalating privileges for executing commands that requires "root". The code in Xcode itself could completely working, but outside of Xcode (for example, in builded app) this does not work. Here is the example from playground:
- Code: Select all
import Cocoa
import SwiftShell
let exprtPools: String = run(bash: "sudo /usr/local/bin/zpool export -a")
print(exprtPools, terminator: "")
As you can see, this is a simple code that uses SwiftShell for exporting all available pools. Works in playground, not in app.
So i have a lot of work to do with that...
If someone knows how to gain system administrator privileges in swift, i would appreciate that.
Sorry for my english if it bad.
P.S.: For a GitHub lovers - i segmented full project on a separate apps for development and debugging every function of featured OpenZFS Utility, so github would'n be a good place for a tons of separate projects. If someone want to join, pm me, or write there.