diff macos/startupScripts.sh @ 0:dfc36e7ed22c

init
author Vadim Filimonov <fffilimonov@yandex.ru>
date Thu, 12 May 2022 13:51:59 +0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macos/startupScripts.sh	Thu May 12 13:51:59 2022 +0400
@@ -0,0 +1,17 @@
+cd ..
+ROOTPWD=$(pwd);
+IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');
+
+user=$(whoami);
+
+systemStarup='/Library/LaunchDaemons';
+localStartup=${ROOTPWD}'/local/startup';
+startup=${ROOTPWD}'/macos';
+
+function addStartup() {
+  cd $localStartup;
+  for file in *.plist; do
+    sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
+    sudo chown root:wheel ${localStartup}/${file};
+  done;
+}