summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorallddd2023-08-08 19:24:14 +0200
committerallddd2023-08-08 19:24:14 +0200
commit5293f8c4c312dc8ff9a273049ab3cea8fd7b88b8 (patch)
treebde748a4e8806ee2dc2c905e139c9cb14dd4c379
parent2b76398a983db1024487cd721802b29d70f7cfc0 (diff)
downloadaur-5293f8c4c312dc8ff9a273049ab3cea8fd7b88b8.tar.gz
reformatted
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD7
-rw-r--r--tuptime.install11
3 files changed, 7 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 43a8b5cab0e7..aa1d8a1e0536 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*
+!.gitignore
!.SRCINFO
!PKGBUILD
!tuptime.install
diff --git a/PKGBUILD b/PKGBUILD
index 2e2bc439ca32..19b240feea98 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,17 +9,15 @@ license=('GPL2')
depends=('python')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('2db03803f3d44c2d4a4bba424eb6cc392092c63a6a281c003adb9bdeb4c57f55')
-install=tuptime.install
+install=${pkgname}.install
prepare() {
- cd ${pkgname}-${pkgver}/src/systemd
-
+ cd ${pkgname}-${pkgver}/src/systemd/
sed -ni '1p' tuptime.sysusers
}
package() {
cd ${pkgname}-${pkgver}
-
install -Dm755 "src/tuptime" "${pkgdir}/usr/bin/tuptime"
install -Dm644 "src/systemd/tuptime.sysusers" "${pkgdir}/usr/lib/sysusers.d/tuptime.conf"
@@ -30,5 +28,4 @@ package() {
install -Dm644 "src/man/tuptime.1" "${pkgdir}/usr/share/man/man1/tuptime.1"
install -Dm644 "tuptime-manual.txt" "${pkgdir}/usr/share/doc/${pkgname}/tuptime-manual.txt"
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/tuptime.install b/tuptime.install
index b8e814a455e1..d7889a173b43 100644
--- a/tuptime.install
+++ b/tuptime.install
@@ -1,13 +1,11 @@
post_install() {
- echo -e '\nTo activate use: \nsystemctl enable --now tuptime.service tuptime-sync.timer \n'
+ echo -e '\nActivate using: \nsystemctl enable --now tuptime.service tuptime-sync.timer \n'
/usr/bin/systemd-sysusers
-
local dir='/var/lib/tuptime'
if [ ! -d ${dir} ]; then
mkdir -p ${dir}
fi
-
chown -R _tuptime:_tuptime ${dir}
chmod 0755 ${dir}
}
@@ -18,7 +16,6 @@ post_upgrade() {
fi
/usr/bin/systemd-sysusers
-
local dir='/var/lib/tuptime'
if [ -d ${dir} ]; then
local owner=$(stat -c %U%G ${dir})
@@ -35,10 +32,10 @@ post_upgrade() {
}
post_remove() {
- if [ -d /var/lib/tuptime ]; then
- rm -rf /var/lib/tuptime
+ local dir='/var/lib/tuptime'
+ if [ -d ${dir} ]; then
+ rm -rf ${dir}
fi
-
if id _tuptime &>/dev/null; then
userdel -f _tuptime
fi