|
10 | 10 | use Hash::Util 'lock_keys'; |
11 | 11 |
|
12 | 12 | 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'; |
13 | 15 |
|
14 | 16 | my %variant_info = ( |
15 | 17 | fast2 => { |
@@ -138,7 +140,7 @@ sub priv_setup { |
138 | 140 |
|
139 | 141 | $priv_doit->make_path('/opt/cpan'); |
140 | 142 |
|
141 | | - $priv_doit->chown(-1, 'www-data', "$repo_localdir/data"); |
| 143 | + $priv_doit->chown(-1, $service_group, "$repo_localdir/data"); |
142 | 144 | $priv_doit->chmod(0775, "$repo_localdir/data"); |
143 | 145 |
|
144 | 146 | 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 { |
169 | 171 | my $conf_data = YAML::Syck::Load($variant_info->{conf_file_content}); |
170 | 172 | if ($conf_data->{static_dist_dir}) { |
171 | 173 | $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}); |
173 | 175 | } |
174 | 176 |
|
175 | 177 | { |
@@ -203,8 +205,8 @@ sub priv_setup { |
203 | 205 | After=syslog.target |
204 | 206 |
|
205 | 207 | [Service] |
206 | | -User=www-data |
207 | | -Group=www-data |
| 208 | +User=$service_user |
| 209 | +Group=$service_group |
208 | 210 |
|
209 | 211 | RuntimeDirectory=starman_$variant_info->{unit_name} |
210 | 212 | PIDFile=/run/starman_$variant_info->{unit_name}/starman.pid |
|
0 commit comments