annotate host/macos/startupScripts.sh @ 1811:55d89a183c82

remove line_diff from luan
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 15 May 2024 18:02:28 -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 }