Ignore:
Timestamp:
Sep 4, 2011, 5:08:26 PM (13 years ago)
Author:
achernya
Message:
Init script (systemd unit) for Scripts Whois service
Location:
branches/fc15-dev/server/fedora
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fc15-dev/server/fedora/specs/whoisd.spec

    r927 r1965  
    1 Summary:        whoisd for <scripts.mit.edu> (virtualhost aware)
    2 Group:                  Applications/System
    3 Name:           whoisd
    4 Version:        0.%{scriptsversion}
    5 Release:        0
    6 Vendor:                 The scripts.mit.edu Team (scripts@mit.edu)
    7 URL:                    http://scripts.mit.edu
    8 License:        GPL
    9 Source0:        %{name}.tar.gz
    10 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
     1Summary:   whoisd for <scripts.mit.edu> (virtualhost aware)
     2Group:     Applications/System
     3Name:      whoisd
     4Version:   0.%{scriptsversion}
     5Release:   1
     6Vendor:    The scripts.mit.edu Team (scripts@mit.edu)
     7URL:       http://scripts.mit.edu
     8License:   GPL
     9Source0:   %{name}.tar.gz
     10
    1111%define debug_package %{nil}
    1212
    13 #BuildRequires:  make
    14 Requires:       python-twisted-core
     13Requires:      python-twisted-core
     14BuildRequires: systemd-units
     15
     16Requires(post):   systemd-units
     17Requires(preun):  systemd-units
     18Requires(postun): systemd-units
     19Requires(post):   systemd-sysv
    1520
    1621%description
     
    2429
    2530%install
    26 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
    2731make install DESTDIR=$RPM_BUILD_ROOT exec_prefix=/usr/local
    2832
    29 %clean
    30 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
     33%post
     34if [ $1 -eq 1 ] ; then
     35    # Initial installation
     36    /bin/systemctl enable scripts-whoisd.service >/dev/null 2>&1 || :
     37fi
     38
     39%preun
     40if [ $1 -eq 0 ]; then
     41    /bin/systemctl --no-reload disable scripts-whoisd.service >/dev/null 2>&1 || :
     42    /bin/systemctl stop scripts-whoisd.service > /dev/null 2>&1 || :
     43fi
     44
     45%postun
     46/bin/systemctl daemon-reload >/dev/null 2>&1 || :
     47if [ $1 -ge 1 ]; then
     48    /bin/systemctl try-restart scripts-whoisd.service >/dev/null 2>&1 || :
     49fi
    3150
    3251%files
    3352%defattr(0644,root,root,-)
    3453/usr/local/libexec/whoisd.tac
    35 %defattr(0600,root,root)
    36 /etc/cron.d/whoisd
     54%defattr(0644,root,root)
     55/lib/systemd/system/scripts-whoisd.service
    3756
    3857%changelog
     58* Thu Aug 25 2011 Alexander Chernyakhovsky <achernya@mit.edu> 0-1
     59- package systemd service file
    3960
    4061* Tue Jun 03 2008 Joe Presbrey <presbrey@mit.edu> 0.00
Note: See TracChangeset for help on using the changeset viewer.