Skip to content

Commit 590108e

Browse files
committed
$service_user and $service_group
1 parent 3c69133 commit 590108e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/setup-cpantestersmatrix-doit.pl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Hash::Util 'lock_keys';
1111

1212
my $dest_system = "analysis2022"; # requires an entry in /etc/hosts with the real IP address
13+
my $service_user = 'www-data';
14+
my $service_group = 'www-data';
1315

1416
my %variant_info = (
1517
fast2 => {
@@ -138,7 +140,7 @@ sub priv_setup {
138140

139141
$priv_doit->make_path('/opt/cpan');
140142

141-
$priv_doit->chown(-1, 'www-data', "$repo_localdir/data");
143+
$priv_doit->chown(-1, $service_group, "$repo_localdir/data");
142144
$priv_doit->chmod(0775, "$repo_localdir/data");
143145

144146
if (!eval { $priv_doit->info_qx({quiet=>1}, 'grep', '-sqr', '^[^#].*ppa.launchpad.net/eserte/bbbike', '/etc/apt/sources.list.d'); 1 }) {
@@ -169,7 +171,7 @@ sub priv_setup {
169171
my $conf_data = YAML::Syck::Load($variant_info->{conf_file_content});
170172
if ($conf_data->{static_dist_dir}) {
171173
$priv_doit->make_path($conf_data->{static_dist_dir});
172-
$priv_doit->chown('www-data', -1, $conf_data->{static_dist_dir});
174+
$priv_doit->chown($service_user, -1, $conf_data->{static_dist_dir});
173175
}
174176

175177
{
@@ -203,8 +205,8 @@ sub priv_setup {
203205
After=syslog.target
204206
205207
[Service]
206-
User=www-data
207-
Group=www-data
208+
User=$service_user
209+
Group=$service_group
208210
209211
RuntimeDirectory=starman_$variant_info->{unit_name}
210212
PIDFile=/run/starman_$variant_info->{unit_name}/starman.pid

0 commit comments

Comments
 (0)