Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 13:48 GMT+02:00 Kristian : > Ok, I changed the postinstall script based on your suggestions: > > i.e. I changed these two lines: > > WEB_GROUP_ID="$(getent group "${WEB_GROUP}" | cut -d: -f3)" > and > > useradd "$WEB_USER" -g "${WEB_GROUP}" -M -r -s /sbin/nologin -c > > And it worked no

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Ok, I changed the postinstall script based on your suggestions: i.e. I changed these two lines: > WEB_GROUP_ID="$(getent group "${WEB_GROUP}" | cut -d: -f3)" and > useradd "$WEB_USER" -g "${WEB_GROUP}" -M -r -s /sbin/nologin -c And it worked now. Thank you for your help. :) 2017-07-20 12:35 GM

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 12:01 GMT+02:00 Kristian : > Hi, > > thank you for your reply. Yes, I add the script with > > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ > postinstall") > > and it basically works, because this file is changing a settings file > without any problems. Only the a

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Hi, thank you for your reply. Yes, I add the script with > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE > "${CMAKE_CURRENT_SOURCE_DIR}/postinstall") and it basically works, because this file is changing a settings file without any problems. Only the add of the group and the user does not work, somehow

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 10:39 GMT+02:00 Kristian : > Hi, > > I create a RPM package with CPack. When installing this package on a > target system, it should create an additional user and group. > > My current solution is a postinstall script, wich runs at the end of > the installation. There, I added commands

[CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Hi, I create a RPM package with CPack. When installing this package on a target system, it should create an additional user and group. My current solution is a postinstall script, wich runs at the end of the installation. There, I added commands to create a user and a group (groupadd, useradd). B