%global d_bin %{_bindir} %global d_home /home %global d_storage_00 %{d_home}/storage_00 %global d_app %{d_storage_00}/app %global d_web %{d_storage_00}/web %global d_storage_01 %{d_home}/storage_01 %global d_data_03 %{d_storage_01}/data_03 %global d_data_04 %{d_storage_01}/data_04 Name: meta-users Version: 1.0.0 Release: 7%{?dist} Summary: META-package for install users License: GPLv3 Requires: meta-system %description META-package for install users. # -------------------------------------------------------------------------------------------------------------------- # # -----------------------------------------------------< SCRIPT >----------------------------------------------------- # # -------------------------------------------------------------------------------------------------------------------- # %pre # User: app_0000-0009. for i in {0..9}; do getent group "app_000${i}" > /dev/null || groupadd "app_000${i}" getent passwd "app_000${i}" > /dev/null || \ useradd -g "app_000${i}" -d "%{d_app}/app_000${i}" -s /bin/zsh \ -c "APP_000${i}" "app_000${i}" done # User: app_0010-0019. for i in {0..9}; do getent group "app_001${i}" > /dev/null || groupadd "app_001${i}" getent passwd "app_001${i}" > /dev/null || \ useradd -g "app_001${i}" -d "%{d_app}/app_001${i}" -s /bin/zsh \ -c "APP_001${i}" "app_001${i}" done # User: app_0020-0029. for i in {0..9}; do getent group "app_002${i}" > /dev/null || groupadd "app_002${i}" getent passwd "app_002${i}" > /dev/null || \ useradd -g "app_002${i}" -d "%{d_app}/app_002${i}" -s /bin/zsh \ -c "APP_002${i}" "app_002${i}" done # User: web_0000-0009. for i in {0..9}; do getent group "web_000${i}" > /dev/null || groupadd "web_000${i}" getent passwd "web_000${i}" > /dev/null || \ useradd -g "web_000${i}" -d "%{d_web}/web_000${i}" -s /bin/zsh \ -c "WEB_000${i}" "web_000${i}" done # User: web_0010-0019. for i in {0..9}; do getent group "web_001${i}" > /dev/null || groupadd "web_001${i}" getent passwd "web_001${i}" > /dev/null || \ useradd -g "web_001${i}" -d "%{d_web}/web_001${i}" -s /bin/zsh \ -c "WEB_001${i}" "web_001${i}" done # User: web_0020-0029. for i in {0..9}; do getent group "web_002${i}" > /dev/null || groupadd "web_002${i}" getent passwd "web_002${i}" > /dev/null || \ useradd -g "web_002${i}" -d "%{d_web}/web_002${i}" -s /bin/zsh \ -c "WEB_002${i}" "web_002${i}" done exit 0 %install # Directory: app_000*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_03}/app_000${i} done # Directory: app_001*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_03}/app_001${i} done # Directory: app_002*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_03}/app_002${i} done # Directory: web_000*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_04}/web_000${i} done # Directory: web_001*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_04}/web_001${i} done # Directory: web_002*. for i in {0..9}; do %{__install} -dp -m 0755 %{buildroot}%{d_data_04}/web_002${i} done %files # Directory: data_03/app_*. %attr(0700,app_0000,app_0000) %dir %{d_data_03}/app_0000 %attr(0700,app_0001,app_0001) %dir %{d_data_03}/app_0001 %attr(0700,app_0002,app_0002) %dir %{d_data_03}/app_0002 %attr(0700,app_0003,app_0003) %dir %{d_data_03}/app_0003 %attr(0700,app_0004,app_0004) %dir %{d_data_03}/app_0004 %attr(0700,app_0005,app_0005) %dir %{d_data_03}/app_0005 %attr(0700,app_0006,app_0006) %dir %{d_data_03}/app_0006 %attr(0700,app_0007,app_0007) %dir %{d_data_03}/app_0007 %attr(0700,app_0008,app_0008) %dir %{d_data_03}/app_0008 %attr(0700,app_0009,app_0009) %dir %{d_data_03}/app_0009 %attr(0700,app_0010,app_0010) %dir %{d_data_03}/app_0010 %attr(0700,app_0011,app_0011) %dir %{d_data_03}/app_0011 %attr(0700,app_0012,app_0012) %dir %{d_data_03}/app_0012 %attr(0700,app_0013,app_0013) %dir %{d_data_03}/app_0013 %attr(0700,app_0014,app_0014) %dir %{d_data_03}/app_0014 %attr(0700,app_0015,app_0015) %dir %{d_data_03}/app_0015 %attr(0700,app_0016,app_0016) %dir %{d_data_03}/app_0016 %attr(0700,app_0017,app_0017) %dir %{d_data_03}/app_0017 %attr(0700,app_0018,app_0018) %dir %{d_data_03}/app_0018 %attr(0700,app_0019,app_0019) %dir %{d_data_03}/app_0019 %attr(0700,app_0020,app_0020) %dir %{d_data_03}/app_0020 %attr(0700,app_0021,app_0021) %dir %{d_data_03}/app_0021 %attr(0700,app_0022,app_0022) %dir %{d_data_03}/app_0022 %attr(0700,app_0023,app_0023) %dir %{d_data_03}/app_0023 %attr(0700,app_0024,app_0024) %dir %{d_data_03}/app_0024 %attr(0700,app_0025,app_0025) %dir %{d_data_03}/app_0025 %attr(0700,app_0026,app_0026) %dir %{d_data_03}/app_0026 %attr(0700,app_0027,app_0027) %dir %{d_data_03}/app_0027 %attr(0700,app_0028,app_0028) %dir %{d_data_03}/app_0028 %attr(0700,app_0029,app_0029) %dir %{d_data_03}/app_0029 # Directory: data_04/web_*. %attr(0700,web_0000,web_0000) %dir %{d_data_04}/web_0000 %attr(0700,web_0001,web_0001) %dir %{d_data_04}/web_0001 %attr(0700,web_0002,web_0002) %dir %{d_data_04}/web_0002 %attr(0700,web_0003,web_0003) %dir %{d_data_04}/web_0003 %attr(0700,web_0004,web_0004) %dir %{d_data_04}/web_0004 %attr(0700,web_0005,web_0005) %dir %{d_data_04}/web_0005 %attr(0700,web_0006,web_0006) %dir %{d_data_04}/web_0006 %attr(0700,web_0007,web_0007) %dir %{d_data_04}/web_0007 %attr(0700,web_0008,web_0008) %dir %{d_data_04}/web_0008 %attr(0700,web_0009,web_0009) %dir %{d_data_04}/web_0009 %attr(0700,web_0010,web_0010) %dir %{d_data_04}/web_0010 %attr(0700,web_0011,web_0011) %dir %{d_data_04}/web_0011 %attr(0700,web_0012,web_0012) %dir %{d_data_04}/web_0012 %attr(0700,web_0013,web_0013) %dir %{d_data_04}/web_0013 %attr(0700,web_0014,web_0014) %dir %{d_data_04}/web_0014 %attr(0700,web_0015,web_0015) %dir %{d_data_04}/web_0015 %attr(0700,web_0016,web_0016) %dir %{d_data_04}/web_0016 %attr(0700,web_0017,web_0017) %dir %{d_data_04}/web_0017 %attr(0700,web_0018,web_0018) %dir %{d_data_04}/web_0018 %attr(0700,web_0019,web_0019) %dir %{d_data_04}/web_0019 %attr(0700,web_0020,web_0020) %dir %{d_data_04}/web_0020 %attr(0700,web_0021,web_0021) %dir %{d_data_04}/web_0021 %attr(0700,web_0022,web_0022) %dir %{d_data_04}/web_0022 %attr(0700,web_0023,web_0023) %dir %{d_data_04}/web_0023 %attr(0700,web_0024,web_0024) %dir %{d_data_04}/web_0024 %attr(0700,web_0025,web_0025) %dir %{d_data_04}/web_0025 %attr(0700,web_0026,web_0026) %dir %{d_data_04}/web_0026 %attr(0700,web_0027,web_0027) %dir %{d_data_04}/web_0027 %attr(0700,web_0028,web_0028) %dir %{d_data_04}/web_0028 %attr(0700,web_0029,web_0029) %dir %{d_data_04}/web_0029 %changelog * Wed Jul 31 2019 MARKETPLACE - 1.0.0-7 - UPD: SPEC-file. * Sun Jul 28 2019 MARKETPLACE - 1.0.0-6 - UPD: SPEC-file. * Fri Jul 05 2019 MARKETPLACE - 1.0.0-5 - UPD: SPEC-file. * Thu Jul 04 2019 MARKETPLACE - 1.0.0-4 - UPD: SPEC-file. * Thu Jul 04 2019 MARKETPLACE - 1.0.0-3 - UPD: SPEC-file. * Thu Jul 04 2019 MARKETPLACE - 1.0.0-2 - FIX: "useradd: invalid comment". * Tue Jul 02 2019 MARKETPLACE - 1.0.0-1 - Initial build.