-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcronie
More file actions
93 lines (66 loc) · 2.06 KB
/
cronie
File metadata and controls
93 lines (66 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
export CFLAGS="-O2 "
export CXXFLAGS="-O2 "
PKG_VER=1.7.2
URL=https://github.com/cronie-crond/cronie/releases/download/cronie-$PKG_VER/cronie-$PKG_VER.tar.gz
TAR=$(echo $URL | sed -r 's|(.*)/||')
DIR=$(echo $TAR | sed 's|.tar.*||g')
PACKAGE=$(echo $DIR | sed 's|-[^-]*$||g')
# Get Package
cd /blfs/builds
wget $URL
tar -xvf $TAR
cd $DIR
# Build
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-anacron \
--with-inotify \
--with-pam
make
# Install
sudo make DESTDIR=/pkgs/$PACKAGE install
# thanks arch
chmod u+s /pkgs/$PACKAGE/usr/bin/crontab
install -d /pkgs/$PACKAGE/var/spool/{ana,}cron
install -d /pkgs/$PACKAGE/etc/cron.{d,hourly,daily,weekly,monthly}
mkdir -p /pkgs/$PACKAGE/etc/default
cat > /pkgs/$PACKAGE/etc/default/anacron << EOF
# /etc/default/anacron
# Set this to 'yes' to have anacron run while on battery
# By default it is not run while on battery
#ANACRON_RUN_ON_BATTERY_POWER=no
EOF
cat > /pkgs/$PACKAGE/etc/cron-deny << EOF
# needed so users outside of cron.allow can use the cron daemon
EOF
cat > /pkgs/$PACKAGE/etc/crontab << EOF
# /etc/crontab: configuration file for cron
# See cron(8) and crontab(5) for details.
# m h dom mon dow user command
EOF
install -Dm0644 contrib/anacrontab /pkgs/$PACKAGE/etc/anacrontab
install -Dm0644 contrib/0hourly /pkgs/$PACKAGE/etc/cron.d/0hourly
install -Dm0755 contrib/0anacron /pkgs/$PACKAGE/etc/cron.hourly/0anacron
install -Dm0644 contrib/cronie.systemd /pkgs/$PACKAGE/usr/lib/systemd/system/cronie.service
install -Dm0644 crond.sysconfig /pkgs/$PACKAGE/etc/sysconfig/crond
install -Dm0644 pam/crond /pkgs/$PACKAGE/etc/pam.d/crond
cd /pkgs
sudo echo "pam bash" > /pkgs/$PACKAGE/depends
cat > /pkgs/$PACKAGE/backup << EOF
/etc/anacrontab
/etc/cron.d/0hourly
/etc/cron.deny
/etc/crontab
/etc/default/anacron
/etc/pam.d/crond
/etc/sysconfig/crod
EOF
sudo echo "inotify-tools" > /pkgs/$PACKAGE/make-depends
sudo echo "$PKG_VER" > /pkgs/$PACKAGE/version
sudo tar -cvapf $PACKAGE.tar.xz $PACKAGE
sudo cp $PACKAGE.tar.xz /finished
cd /blfs/builds
sudo rm -r $DIR