annotate backup/macos/addStartupScripts.sh @ 1728:30df07a9771c

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 30 Aug 2022 21:59:51 -0600
parents 45eaaf5146f3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 #!/bin/bash
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 . startupScripts.sh;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 mkdir -p $localStartup 2>/dev/null;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 cd $startup;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 for file in *.plist; do
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 log=${ROOTPWD}"/logs/startup.${file}.log";
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10 sed "s~PWD~${startup}~g;\
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 s~LOG~${log}~g;\
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 s~USER~${user}~g;\
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13 s~ROOT~${ROOTPWD}~g" $file > ${localStartup}/${file};
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 done;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 addStartup;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
18 cd $ROOTPWD;