annotate host/macos/startupScripts.sh @ 1721:5c69d2e8bd75

no regex in String.find and String.split
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 26 Jul 2022 12:44:52 -0600
parents 6378d261136e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1635
fd3d56f39450 rearrange startup files
Franklin Schmidt <fschmidt@gmail.com>
parents: 1632
diff changeset
1 cd ..
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
2 ROOTPWD=$(pwd);
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
3 IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
4
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
5 user=$(whoami);
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
6
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
7 systemStarup='/Library/LaunchDaemons';
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
8 localStartup=${ROOTPWD}'/local/startup';
1635
fd3d56f39450 rearrange startup files
Franklin Schmidt <fschmidt@gmail.com>
parents: 1632
diff changeset
9 startup=${ROOTPWD}'/macos';
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
10
1632
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
11 function addStartup() {
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
12 cd $localStartup;
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
13 for file in *.plist; do
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
14 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
15 sudo chown root:wheel ${localStartup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
16 done;
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
17 }