annotate host/macos/startupScripts.sh @ 1660:2968e43cdd44

manual work
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 19 Apr 2022 23:46:06 -0600
parents fd3d56f39450
children 6378d261136e
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';
fd3d56f39450 rearrange startup files
Franklin Schmidt <fschmidt@gmail.com>
parents: 1632
diff changeset
10 startupPostgres=${ROOTPWD}'/macos/postgres';
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
11
1632
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
12 function addStartup() {
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
13 cd $localStartup;
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
14 for file in *.plist; do
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
15 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
16 sudo chown root:wheel ${localStartup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
17 done;
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
18 }