Skip to content

Commit

Permalink
v0.3.2: post-install scriptlet to fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrez committed May 15, 2021
1 parent f8140f4 commit b0ff266
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Service Commander's unique design is intended to offer a great deal of flexibili
# Installation

## Option 1: Binary distribution
You can install the binary distribution by copying the link to the `.rpm` file from the releases page of this project and using `yum` to install it. For instance, to install the v0.3.1 release:
You can install the binary distribution by copying the link to the `.rpm` file from the releases page of this project and using `yum` to install it. For instance, to install the v0.3.2 release:
```
yum install https://github.com/ThePrez/ServiceCommander-IBMi/releases/download/v0.3.1/sc-0.3.1-0.ibmi7.2.ppc64.rpm
yum install https://github.com/ThePrez/ServiceCommander-IBMi/releases/download/v0.3.2/sc-0.3.2-0.ibmi7.2.ppc64.rpm
```
Of note, this RPM has not yet been tested. Feel free to evaluate and submit an issue if you encounter any problems.

Expand Down Expand Up @@ -155,7 +155,7 @@ sc check port:8080

## Through YAML configuration files
This tool allows you to define any services of interest in `.yaml` files. These files can be stored in any of the following locations:
- A global directory (/QOpenSys/etc/sc/services)
- A global directory (/QOpenSys/etc/sc/services). This, of coures, requires you to have admin access (`*ALLOBJ` special authority).
- A user-specific directory($HOME/.sc/services)
- If defined, whatever the value of the `services.dir` system property is.
The file name must be in the format of `service_name.yaml` (or `service_name.yml`), where "service_name" is the "simple name" of the service as to be used with this tool's CLI. The service name must consist of only lowercase letters, numbers, hyphens, and underscores.
Expand Down
17 changes: 16 additions & 1 deletion sc.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
%undefine _disable_source_fetch
Name: sc
Version: 0.3.1
Version: 0.3.2
Release: 0
License: Apache-2.0
Summary: Service Commander, a utility for managing services and applications on IBM i.
Expand Down Expand Up @@ -33,6 +34,18 @@ gmake all
%install
INSTALL_ROOT=%{buildroot} gmake -e install

%post -p %{_bindir}/bash
if [ -e /QOpenSys/etc/sc ]; then
chown qsys /QOpenSys/etc/sc
chmod 755 /QOpenSys/etc/sc
fi
if [ -e /QOpenSys/etc/sc/services ]; then
chown qsys /QOpenSys/etc/sc/services
chmod 755 /QOpenSys/etc/sc/services
/QOpenSys/usr/bin/find /QOpenSys/etc/sc/services/ -type f -exec chmod 644 {} \;
/QOpenSys/usr/bin/find /QOpenSys/etc/sc/services/ -type l -exec chmod 644 {} \;
fi

%files
%defattr(-, qsys, *none)

Expand All @@ -42,6 +55,8 @@ INSTALL_ROOT=%{buildroot} gmake -e install
%{_mandir}/man1/%{name}.*

%changelog
* Sat May 15 2021 Jesse Gorzinski <[email protected]> - 0.3.2
- enhancement: install scriptlet to lock down permissions of existing YAML configurations
* Sat May 15 2021 Jesse Gorzinski <[email protected]> - 0.3.1
- bugfix: proper handling of quoted args for 'scinit'
* Fri May 14 2021 Jesse Gorzinski <[email protected]> - 0.3.0
Expand Down

0 comments on commit b0ff266

Please sign in to comment.