name
Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
parent
2fd4177373
commit
8e051c4e69
|
@ -25,31 +25,31 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
#Upgrading
|
#Upgrading
|
||||||
if [ $1 -eq 2 ]; then
|
if [ $1 -eq 2 ]; then
|
||||||
/usr/bin/systemctl stop %{pkgname}.service >/dev/null 2>&1 ||:
|
/usr/bin/systemctl stop %{name}.service >/dev/null 2>&1 ||:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
/usr/bin/systemctl daemon-reload
|
/usr/bin/systemctl daemon-reload
|
||||||
/usr/bin/systemctl start %{pkgname}.service
|
/usr/bin/systemctl start %{name}.service
|
||||||
fi
|
fi
|
||||||
if [ $1 -eq 2 ]; then
|
if [ $1 -eq 2 ]; then
|
||||||
/usr/bin/systemctl daemon-reload
|
/usr/bin/systemctl daemon-reload
|
||||||
/usr/bin/systemctl start %{pkgname}.service
|
/usr/bin/systemctl start %{name}.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#old package
|
#old package
|
||||||
#uninstall
|
#uninstall
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
/usr/bin/systemctl --no-reload disable %{pkgname}.service
|
/usr/bin/systemctl --no-reload disable %{name}.service
|
||||||
/usr/bin/systemctl stop %{pkgname}.service >/dev/null 2>&1 ||:
|
/usr/bin/systemctl stop %{name}.service >/dev/null 2>&1 ||:
|
||||||
/usr/bin/systemctl disable %{pkgname}.service
|
/usr/bin/systemctl disable %{name}.service
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
/usr/bin/systemctl --no-reload disable %{pkgname}.service
|
/usr/bin/systemctl --no-reload disable %{name}.service
|
||||||
/usr/bin/systemctl stop %{pkgname}.service
|
/usr/bin/systemctl stop %{name}.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
@ -63,8 +63,8 @@ rm -rf %{buildroot}
|
||||||
mkdir -p %{buildroot}
|
mkdir -p %{buildroot}
|
||||||
cp -a * %{buildroot}
|
cp -a * %{buildroot}
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 0644 ./%{pkgname}.service %{buildroot}%{_unitdir}
|
install -m 0644 ./%{name}.service %{buildroot}%{_unitdir}
|
||||||
install -m 0644 ./%{pkgname}.default %{buildroot}/etc/default/printerfacts
|
install -m 0644 ./%{name}.default %{buildroot}/etc/default/printerfacts
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
Loading…
Reference in New Issue