Move when /opt dirs are created. Copy pushover to /opt/bin.
This commit is contained in:
parent
68b98281bd
commit
1ef2994dbd
2 changed files with 15 additions and 11 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
|
# Create /opt directories.
|
||||||
|
mkdir -p -m 755 {/opt,/opt/{bin,include,info,lib64,man,man/man{0..8},sbin,share}}
|
||||||
|
|
||||||
# Install the LetsEncrypt CA bundles, to stop wget moaning.
|
# Install the LetsEncrypt CA bundles, to stop wget moaning.
|
||||||
cp -R ca-certificates /usr/local/share
|
cp -R ca-certificates /usr/local/share
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
@ -15,14 +18,14 @@ cat root.crontab >/var/spool/cron/crontabs/root
|
||||||
/etc/rc.d/rc.crond restart
|
/etc/rc.d/rc.crond restart
|
||||||
|
|
||||||
# Install the /etc files.
|
# Install the /etc files.
|
||||||
cd base-files
|
( cd base-files
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for dir in $(find . -type d | sort | sed -re 's/^\.\///'); do
|
for dir in $(find . -type d | sort | sed -re 's/^\.\///'); do
|
||||||
mkdir -p -m 755 /etc/$dir
|
mkdir -p -m 755 /etc/$dir
|
||||||
done
|
done
|
||||||
for file in $(find . -type f | sort | sed -re 's/^\.\///'); do
|
for file in $(find . -type f | sort | sed -re 's/^\.\///'); do
|
||||||
cat "$file" >"/etc/$file"
|
cat "$file" >"/etc/$file"
|
||||||
done
|
done )
|
||||||
|
|
||||||
# Correct file/directory specific permissions.
|
# Correct file/directory specific permissions.
|
||||||
chmod 755 /etc/cron.daily/update-slackpkg-template
|
chmod 755 /etc/cron.daily/update-slackpkg-template
|
||||||
|
@ -39,6 +42,10 @@ chmod 755 /etc/profile.d/optpaths.csh
|
||||||
chmod 755 /etc/profile.d/optpaths.sh
|
chmod 755 /etc/profile.d/optpaths.sh
|
||||||
chmod 750 /etc/sudoers.d
|
chmod 750 /etc/sudoers.d
|
||||||
|
|
||||||
|
# Install pushover.
|
||||||
|
cp utils/pushover /opt/bin
|
||||||
|
chmod 755 /opt/bin/pushover
|
||||||
|
|
||||||
# Decrypt the pushover-config.
|
# Decrypt the pushover-config.
|
||||||
echo "Decrypting /etc/pushover/pushover-config..."
|
echo "Decrypting /etc/pushover/pushover-config..."
|
||||||
gpg -d -o /etc/pushover/pushover-config /etc/pushover/pushover-config.gpg
|
gpg -d -o /etc/pushover/pushover-config /etc/pushover/pushover-config.gpg
|
||||||
|
|
|
@ -32,9 +32,6 @@ gpg -c -o /etc/shadow.gpg /etc/shadow
|
||||||
echo "Encrypting /etc/gshadow..."
|
echo "Encrypting /etc/gshadow..."
|
||||||
gpg -c -o /etc/gshadow.gpg /etc/gshadow
|
gpg -c -o /etc/gshadow.gpg /etc/gshadow
|
||||||
|
|
||||||
# Create /opt directories.
|
|
||||||
mkdir -p -m 755 {/opt,/opt/{bin,include,info,lib64,man,man/man{0..8},sbin,share}}
|
|
||||||
|
|
||||||
# Create log archive directories and move old log files.
|
# Create log archive directories and move old log files.
|
||||||
[ ! -d /var/log/Archived/pre-sysconfig ] && {
|
[ ! -d /var/log/Archived/pre-sysconfig ] && {
|
||||||
mkdir -p -m 750 /var/log/Archived
|
mkdir -p -m 750 /var/log/Archived
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue